Initial commit to Gerrit 1.0 1.0_branch tizen/20120530.1
authorYang Lin <lin.a.yang@intel.com>
Wed, 30 May 2012 10:43:16 +0000 (18:43 +0800)
committerYang Lin <lin.a.yang@intel.com>
Wed, 30 May 2012 10:43:16 +0000 (18:43 +0800)
211 files changed:
COPYING [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
compile [new file with mode: 0755]
config.guess [new file with mode: 0755]
config.h.in [new file with mode: 0644]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
depcomp [new file with mode: 0755]
doc/Makefile.am [new file with mode: 0644]
doc/Makefile.in [new file with mode: 0644]
doc/building.xml [new file with mode: 0644]
doc/concepts.xml [new file with mode: 0644]
doc/html/ch01.html [new file with mode: 0644]
doc/html/ch02.html [new file with mode: 0644]
doc/html/ch03.html [new file with mode: 0644]
doc/html/ch04.html [new file with mode: 0644]
doc/html/ch05.html [new file with mode: 0644]
doc/html/home.png [new file with mode: 0644]
doc/html/index.html [new file with mode: 0644]
doc/html/index.sgml [new file with mode: 0644]
doc/html/left.png [new file with mode: 0644]
doc/html/orc-ARM.html [new file with mode: 0644]
doc/html/orc-MMX.html [new file with mode: 0644]
doc/html/orc-Orc.html [new file with mode: 0644]
doc/html/orc-OrcCompiler.html [new file with mode: 0644]
doc/html/orc-OrcDebug.html [new file with mode: 0644]
doc/html/orc-OrcExecutor.html [new file with mode: 0644]
doc/html/orc-OrcOpcode.html [new file with mode: 0644]
doc/html/orc-OrcProgram.html [new file with mode: 0644]
doc/html/orc-OrcRule.html [new file with mode: 0644]
doc/html/orc-PowerPC.html [new file with mode: 0644]
doc/html/orc-SSE.html [new file with mode: 0644]
doc/html/orc-Utility-functions.html [new file with mode: 0644]
doc/html/orc-building.html [new file with mode: 0644]
doc/html/orc-concepts.html [new file with mode: 0644]
doc/html/orc-misc.html [new file with mode: 0644]
doc/html/orc-opcodes.html [new file with mode: 0644]
doc/html/orc-tutorial.html [new file with mode: 0644]
doc/html/orc-x86.html [new file with mode: 0644]
doc/html/orc.devhelp [new file with mode: 0644]
doc/html/orc.devhelp2 [new file with mode: 0644]
doc/html/right.png [new file with mode: 0644]
doc/html/style.css [new file with mode: 0644]
doc/html/up.png [new file with mode: 0644]
doc/opcode_table.xml [new file with mode: 0644]
doc/opcodes.xml [new file with mode: 0644]
doc/orc-docs.sgml [new file with mode: 0644]
doc/orc-overrides.txt [new file with mode: 0644]
doc/orc-sections.txt [new file with mode: 0644]
doc/orc.types [new file with mode: 0644]
doc/table.xml [new file with mode: 0644]
doc/tmpl/misc.sgml [new file with mode: 0644]
doc/tmpl/mmx.sgml [new file with mode: 0644]
doc/tmpl/orc-unused.sgml [new file with mode: 0644]
doc/tmpl/orc.sgml [new file with mode: 0644]
doc/tmpl/orcarm.sgml [new file with mode: 0644]
doc/tmpl/orccompiler.sgml [new file with mode: 0644]
doc/tmpl/orcdebug.sgml [new file with mode: 0644]
doc/tmpl/orcexecutor.sgml [new file with mode: 0644]
doc/tmpl/orcmmx.sgml [new file with mode: 0644]
doc/tmpl/orcopcode.sgml [new file with mode: 0644]
doc/tmpl/orcpowerpc.sgml [new file with mode: 0644]
doc/tmpl/orcprogram.sgml [new file with mode: 0644]
doc/tmpl/orcrule.sgml [new file with mode: 0644]
doc/tmpl/orcsse.sgml [new file with mode: 0644]
doc/tmpl/orcutils.sgml [new file with mode: 0644]
doc/tmpl/orcx86.sgml [new file with mode: 0644]
doc/tmpl/sse.sgml [new file with mode: 0644]
doc/tmpl/x86.sgml [new file with mode: 0644]
doc/tutorial.xml [new file with mode: 0644]
doc/version.entities.in [new file with mode: 0644]
examples/Makefile.am [new file with mode: 0644]
examples/Makefile.in [new file with mode: 0644]
examples/example1.c [new file with mode: 0644]
examples/example1orc.orc [new file with mode: 0644]
examples/example2.c [new file with mode: 0644]
examples/example2orc.orc [new file with mode: 0644]
examples/example3.c [new file with mode: 0644]
examples/example3orc.orc [new file with mode: 0644]
examples/mt19937ar.c [new file with mode: 0644]
examples/mt19937arorc.orc [new file with mode: 0644]
examples/volscale.c [new file with mode: 0644]
gtk-doc.make [new file with mode: 0644]
install-sh [new file with mode: 0755]
ltmain.sh [new file with mode: 0755]
m4/ac_libtool_tags.m4 [new file with mode: 0644]
m4/as-compiler-flag.m4 [new file with mode: 0644]
m4/as-host-defines.m4 [new file with mode: 0644]
m4/as-nano.m4 [new file with mode: 0644]
m4/ax_create_stdint_h.m4 [new file with mode: 0644]
m4/gtk-doc.m4 [new file with mode: 0644]
m4/libtool.m4 [new file with mode: 0644]
m4/ltoptions.m4 [new file with mode: 0644]
m4/ltsugar.m4 [new file with mode: 0644]
m4/ltversion.m4 [new file with mode: 0644]
m4/lt~obsolete.m4 [new file with mode: 0644]
m4/pkg.m4 [new file with mode: 0644]
missing [new file with mode: 0755]
orc-test/Makefile.am [new file with mode: 0644]
orc-test/Makefile.in [new file with mode: 0644]
orc-test/orcarray.c [new file with mode: 0644]
orc-test/orcarray.h [new file with mode: 0644]
orc-test/orcprofile.c [new file with mode: 0644]
orc-test/orcprofile.h [new file with mode: 0644]
orc-test/orcrandom.c [new file with mode: 0644]
orc-test/orcrandom.h [new file with mode: 0644]
orc-test/orctest.c [new file with mode: 0644]
orc-test/orctest.h [new file with mode: 0644]
orc-uninstalled.pc.in [new file with mode: 0644]
orc.pc.in [new file with mode: 0644]
orc/Makefile.am [new file with mode: 0644]
orc/Makefile.in [new file with mode: 0644]
orc/generate-emulation.c [new file with mode: 0644]
orc/opcodes.h [new file with mode: 0644]
orc/orc.c [new file with mode: 0644]
orc/orc.h [new file with mode: 0644]
orc/orcarm.c [new file with mode: 0644]
orc/orcarm.h [new file with mode: 0644]
orc/orccode.c [new file with mode: 0644]
orc/orccodemem.c [new file with mode: 0644]
orc/orccompiler.c [new file with mode: 0644]
orc/orccpu-arm.c [new file with mode: 0644]
orc/orccpu-powerpc.c [new file with mode: 0644]
orc/orccpu-x86.c [new file with mode: 0644]
orc/orcdebug.c [new file with mode: 0644]
orc/orcdebug.h [new file with mode: 0644]
orc/orcemulateopcodes.c [new file with mode: 0644]
orc/orcemulateopcodes.h [new file with mode: 0644]
orc/orcexecutor.c [new file with mode: 0644]
orc/orcfunctions.c [new file with mode: 0644]
orc/orcfunctions.h [new file with mode: 0644]
orc/orcmmx.c [new file with mode: 0644]
orc/orcmmx.h [new file with mode: 0644]
orc/orcneon.h [new file with mode: 0644]
orc/orconce.c [new file with mode: 0644]
orc/orconce.h [new file with mode: 0644]
orc/orcopcodes.c [new file with mode: 0644]
orc/orcparse.c [new file with mode: 0644]
orc/orcparse.h [new file with mode: 0644]
orc/orcpowerpc.c [new file with mode: 0644]
orc/orcpowerpc.h [new file with mode: 0644]
orc/orcprogram-altivec.c [new file with mode: 0644]
orc/orcprogram-arm.c [new file with mode: 0644]
orc/orcprogram-c.c [new file with mode: 0644]
orc/orcprogram-c64x-c.c [new file with mode: 0644]
orc/orcprogram-mmx.c [new file with mode: 0644]
orc/orcprogram-neon.c [new file with mode: 0644]
orc/orcprogram-sse.c [new file with mode: 0644]
orc/orcprogram.c [new file with mode: 0644]
orc/orcprogram.h [new file with mode: 0644]
orc/orcrule.c [new file with mode: 0644]
orc/orcrules-altivec.c [new file with mode: 0644]
orc/orcrules-arm.c [new file with mode: 0644]
orc/orcrules-mmx.c [new file with mode: 0644]
orc/orcrules-neon.c [new file with mode: 0644]
orc/orcrules-sse.c [new file with mode: 0644]
orc/orcsse.c [new file with mode: 0644]
orc/orcsse.h [new file with mode: 0644]
orc/orcutils.c [new file with mode: 0644]
orc/orcutils.h [new file with mode: 0644]
orc/orcx86.c [new file with mode: 0644]
orc/orcx86.h [new file with mode: 0644]
packaging/add-armv7l-to-as-host-defines.patch [new file with mode: 0644]
packaging/orc-0.4.11.tar.bz2 [new file with mode: 0644]
packaging/orc-0.4.5-arm-build-failure.patch [new file with mode: 0644]
packaging/orc.changes [new file with mode: 0644]
packaging/orc.spec [new file with mode: 0644]
packaging/orc.yaml [new file with mode: 0644]
testsuite/Makefile.am [new file with mode: 0644]
testsuite/Makefile.in [new file with mode: 0644]
testsuite/abi.c [new file with mode: 0644]
testsuite/benchmorc/Makefile.am [new file with mode: 0644]
testsuite/benchmorc/Makefile.in [new file with mode: 0644]
testsuite/benchmorc/benchmorc.c [new file with mode: 0644]
testsuite/compile_opcodes_sys.c [new file with mode: 0644]
testsuite/compile_opcodes_sys_c.c [new file with mode: 0644]
testsuite/compile_opcodes_sys_neon.c [new file with mode: 0644]
testsuite/compile_parse.c [new file with mode: 0644]
testsuite/compile_parse_c.c [new file with mode: 0644]
testsuite/compile_parse_neon.c [new file with mode: 0644]
testsuite/exec_opcodes_sys.c [new file with mode: 0644]
testsuite/exec_parse.c [new file with mode: 0644]
testsuite/generate_opcodes_sys.c [new file with mode: 0644]
testsuite/generate_xml_table.c [new file with mode: 0644]
testsuite/generate_xml_table2.c [new file with mode: 0644]
testsuite/memcpy_speed.c [new file with mode: 0644]
testsuite/orcc/Makefile.am [new file with mode: 0644]
testsuite/orcc/Makefile.in [new file with mode: 0644]
testsuite/orcc/orc_test.c [new file with mode: 0644]
testsuite/orcc/test2.c [new file with mode: 0644]
testsuite/orcc/test3.c [new file with mode: 0644]
testsuite/orcc/testorc.c [new file with mode: 0644]
testsuite/perf_opcodes_sys.c [new file with mode: 0644]
testsuite/perf_opcodes_sys_compare.c [new file with mode: 0644]
testsuite/perf_parse.c [new file with mode: 0644]
testsuite/perf_parse_compare.c [new file with mode: 0644]
testsuite/show_parse.c [new file with mode: 0644]
testsuite/test-schro.c [new file with mode: 0644]
testsuite/test.orc [new file with mode: 0644]
testsuite/test_accsadubl.c [new file with mode: 0644]
tools/Makefile.am [new file with mode: 0644]
tools/Makefile.in [new file with mode: 0644]
tools/orc-bugreport.c [new file with mode: 0644]
tools/orcc.c [new file with mode: 0644]
tools/test.orc [new file with mode: 0644]

diff --git a/COPYING b/COPYING
new file mode 100644 (file)
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 <ds@schleef.org>
+  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 (file)
index 0000000..fa8938c
--- /dev/null
@@ -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 (file)
index 0000000..1917f0e
--- /dev/null
@@ -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 (file)
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 (file)
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 (file)
index 0000000..771091b
--- /dev/null
@@ -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 <conftest.tar])
+    grep GrepMe conftest.dir/file >/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 (executable)
index 0000000..e43e0df
--- /dev/null
@@ -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 (executable)
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 <tromey@cygnus.com>.
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+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 <bug-automake@gnu.org>.
+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 (executable)
index 0000000..e3a2116
--- /dev/null
@@ -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 <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  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 <config-patches@gnu.org>."
+
+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 <stdio.h>  /* 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 <sys/systemcfg.h>
+
+               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 <stdlib.h>
+              #include <unistd.h>
+
+              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 <unistd.h>
+       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 <features.h>
+       #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' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/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 <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # 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 <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#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 <sys/param.h>
+  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 <sys/param.h>
+#  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 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> 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 (file)
index 0000000..267a01e
--- /dev/null
@@ -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 <dlfcn.h> 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 <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> 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 <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> 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 <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <valgrind/valgrind.h> 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 (executable)
index 0000000..eb0389a
--- /dev/null
@@ -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 <config-patches@gnu.org>.  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 <config-patches@gnu.org>."
+
+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 (executable)
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 </dev/null
+exec 6>&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 <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#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<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  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 <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 <stdio.h>
+#include <stdlib.h>
+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 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  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_compute_int
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $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
+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 <stdio.h>
+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 <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+      *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&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 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#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 <ac_nonexistent.h>
+_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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#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 <ac_nonexistent.h>
+_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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#include <stdlib.h>
+#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 <jrb3@best.com> 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<name>.so
+      # instead of lib<name>.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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 <sys/types.h>
+            #include <sys/param.h>
+
+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 <sys/types.h>
+               #include <sys/param.h>
+
+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 <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+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 <limits.h>
+
+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 <stdint.h>
+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 <stdint.h>
+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 <fcntl.h>
+#include <sys/mman.h>
+
+#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 <sys/param.h>
+#   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 <time.h>
+#include <unistd.h>
+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 2>/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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$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 = "\a"
+
+}
+{
+  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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\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 <stdint.h>" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+else
+
+cat >>$ac_stdint <<STDINT_EOF
+
+/* ................... shortcircuit part ........................... */
+
+#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <stddef.h>
+
+/* .................... 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 <<STDINT_EOF
+/* .................... detections part ............................ */
+
+/* whether we need to define bitspecific types from compiler base types */
+#ifndef _STDINT_HEADER_INTPTR
+#ifndef _STDINT_HEADER_UINT32
+#ifndef _STDINT_HEADER_U_INT32
+#define _STDINT_NEED_INT_MODEL_T
+#else
+#define _STDINT_HAVE_U_INT_TYPES
+#endif
+#endif
+#endif
+
+#ifdef _STDINT_HAVE_U_INT_TYPES
+#undef _STDINT_NEED_INT_MODEL_T
+#endif
+
+#ifdef  _STDINT_CHAR_MODEL
+#if     _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
+#ifndef _STDINT_BYTE_MODEL
+#define _STDINT_BYTE_MODEL 12
+#endif
+#endif
+#endif
+
+#ifndef _STDINT_HAVE_INT_LEAST32_T
+#define _STDINT_NEED_INT_LEAST_T
+#endif
+
+#ifndef _STDINT_HAVE_INT_FAST32_T
+#define _STDINT_NEED_INT_FAST_T
+#endif
+
+#ifndef _STDINT_HEADER_INTPTR
+#define _STDINT_NEED_INTPTR_T
+#ifndef _STDINT_HAVE_INTMAX_T
+#define _STDINT_NEED_INTMAX_T
+#endif
+#endif
+
+
+/* .................... definition part ............................ */
+
+/* some system headers have good uint64_t */
+#ifndef _HAVE_UINT64_T
+#if     defined _STDINT_HAVE_UINT64_T  || defined HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#elif   defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
+#define _HAVE_UINT64_T
+typedef u_int64_t uint64_t;
+#endif
+#endif
+
+#ifndef _HAVE_UINT64_T
+/* .. here are some common heuristics using compiler runtime specifics */
+#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 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 (file)
index 0000000..f7d46bf
--- /dev/null
@@ -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 <time.h>
+#include <unistd.h>
+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 (executable)
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 <http://www.gnu.org/licenses/>.
+
+# 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 <oliva@dcc.unicamp.br>.
+
+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 <bug-automake@gnu.org>.
+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 (file)
index 0000000..1de8cd8
--- /dev/null
@@ -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 (file)
index 0000000..d4d2ae5
--- /dev/null
@@ -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 (file)
index 0000000..8c989a2
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % version-entities SYSTEM "version.entities">
+%version-entities;
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<refentry id="orc-building" revision="29 may 2009">
+<refmeta>
+<refentrytitle>Building Orc and Applications That Use Orc</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>Orc</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Building Orc and Applications that use Orc</refname>
+<refpurpose>
+How to build Orc and applications using it.
+</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Building Orc on UNIX</title>
+
+  <!-- this has been borrowed from the glib docs via gstreamer -->
+  <para>
+    On UNIX, Orc uses the standard GNU build system,
+    using <application>autoconf</application> for package
+    configuration and resolving portability issues,
+    <application>automake</application> for building makefiles
+    that comply with the GNU Coding Standards, and
+    <application>libtool</application> for building shared
+    libraries on multiple platforms.  The normal sequence for
+    compiling and installing the Orc library is thus:
+
+    <literallayout>
+      <userinput>./configure</userinput>
+      <userinput>make</userinput>
+      <userinput>make install</userinput>
+    </literallayout>
+  </para>
+
+  <para>
+    The standard options provided by <application>GNU
+    autoconf</application> may be passed to the
+    <command>configure</command> script.  Please see the
+    <application>autoconf</application> documentation or run
+    <command>./configure --help</command> for information about
+    the standard options.
+  </para>
+
+  <para>
+    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.
+  </para>
+
+</refsect1>
+
+<refsect1>
+<title>Building Orc Applications</title>
+
+<para>
+Applications and libraries can use <command>pkg-config</command> to get all the
+needed compiler and linker flags to build against Orc.  The following
+commands will provide the necessary compiler and linker flags:
+
+<literallayout>
+  <userinput>pkg-config --cflags orc-&ORC_MAJORMINOR;</userinput>
+  <userinput>pkg-config --libs orc-&ORC_MAJORMINOR;</userinput>
+</literallayout>
+</para>
+
+<para>
+When compiling from source, the default installation directory is not
+in the default path for the <command>pkg-config</command>, so you may
+need to set the PKG_CONFIG_DIR environment variable.
+</para>
+
+</refsect1>
+
+</refentry>
diff --git a/doc/concepts.xml b/doc/concepts.xml
new file mode 100644 (file)
index 0000000..10ae505
--- /dev/null
@@ -0,0 +1,250 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % version-entities SYSTEM "version.entities">
+%version-entities;
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<refentry id="orc-concepts" revision="29 may 2009">
+<refmeta>
+<refentrytitle>Orc Concepts</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>Orc</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Orc Concepts</refname>
+<refpurpose>
+High-level view of what Orc does.
+</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Orc Concepts</title>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    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:
+
+    <programlisting>
+      void function (int *dest, int *src1, int *src2, int n)
+      {
+        int i;
+       for (i = 0; i &lt; n; i++) {
+         dest[i] = (src1[i] + src2[i] + 1) >> 1;
+       }
+      }
+    </programlisting>
+
+  </para>
+
+  <para>
+    Orc is primarily targetted toward generating code for vector
+    CPU extensions such as SSE, Altivec, and NEON.
+  </para>
+
+  <para>
+    Possible usage patterns:
+  </para>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    A wide variety of additional workflows are possible, although
+    tools are not yet available to make it convenient.
+  </para>
+
+  <para>
+  </para>
+
+  <para>
+  </para>
+
+</refsect1>
+
+<refsect1>
+<title>Concepts</title>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  The arrays that Orc programs operate on must be contiguous.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.  
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+</refsect1>
+
+<refsect1>
+<title>Extending Orc</title>
+
+<para>
+  Developers can extend Orc primarily by adding new opcode sets, adding
+  new targets, and by adding new target rules.
+</para>
+
+<para>
+  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.
+</para>
+
+</refsect1>
+
+</refentry>
+
diff --git a/doc/html/ch01.html b/doc/html/ch01.html
new file mode 100644 (file)
index 0000000..5181320
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Overview</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="index.html" title="Orc Reference Manual">
+<link rel="prev" href="index.html" title="Orc Reference Manual">
+<link rel="next" href="orc-building.html" title="Building Orc and Applications That Use Orc">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="index.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-building.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter" title="Overview">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id2914371"></a>Overview</h2></div></div></div>
+<div class="toc"><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-building.html">Building Orc and Applications That Use Orc</a></span><span class="refpurpose"> â€” 
+How to build Orc and applications using it.
+</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-concepts.html">Orc Concepts</a></span><span class="refpurpose"> â€” 
+High-level view of what Orc does.
+</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-tutorial.html">Orc Tutorial</a></span><span class="refpurpose"> â€” 
+Getting started writing Orc code.
+</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/ch02.html b/doc/html/ch02.html
new file mode 100644 (file)
index 0000000..05b96b8
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Application API</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="index.html" title="Orc Reference Manual">
+<link rel="prev" href="orc-tutorial.html" title="Orc Tutorial">
+<link rel="next" href="orc-Orc.html" title="Orc">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="orc-tutorial.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-Orc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter" title="Application API">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id2914407"></a>Application API</h2></div></div></div>
+<div class="toc"><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-Orc.html">Orc</a></span><span class="refpurpose"> â€” Library Initialization</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcProgram.html">OrcProgram</a></span><span class="refpurpose"> â€” Creating and manipulating Orc programs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcCompiler.html">OrcCompiler</a></span><span class="refpurpose"> â€” Compile Orc programs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcExecutor.html">OrcExecutor</a></span><span class="refpurpose"> â€” Running Orc programs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-opcodes.html">Orc Opcodes</a></span><span class="refpurpose"> â€” 
+Description of Opcodes
+</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/ch03.html b/doc/html/ch03.html
new file mode 100644 (file)
index 0000000..1732a15
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Extension API</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="index.html" title="Orc Reference Manual">
+<link rel="prev" href="orc-opcodes.html" title="Orc Opcodes">
+<link rel="next" href="orc-OrcDebug.html" title="OrcDebug">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="orc-opcodes.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-OrcDebug.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter" title="Extension API">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id2914447"></a>Extension API</h2></div></div></div>
+<div class="toc"><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcDebug.html">OrcDebug</a></span><span class="refpurpose"> â€” Printing and formatting debug information</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcOpcode.html">OrcOpcode</a></span><span class="refpurpose"> â€” Operations</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-Utility-functions.html">Utility functions</a></span><span class="refpurpose"> â€” Orc utility functions</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcRule.html">OrcRule</a></span><span class="refpurpose"> â€” Creating rules for code generation</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/ch04.html b/doc/html/ch04.html
new file mode 100644 (file)
index 0000000..96c07cb
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Code Generation</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="index.html" title="Orc Reference Manual">
+<link rel="prev" href="orc-OrcRule.html" title="OrcRule">
+<link rel="next" href="orc-ARM.html" title="ARM">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="orc-OrcRule.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-ARM.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter" title="Code Generation">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id2914472"></a>Code Generation</h2></div></div></div>
+<div class="toc"><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-ARM.html">ARM</a></span><span class="refpurpose"> â€” code generation for ARM</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-MMX.html">MMX</a></span><span class="refpurpose"> â€” code generation for MMX</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-PowerPC.html">PowerPC</a></span><span class="refpurpose"> â€” code generation for PowerPC</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-SSE.html">SSE</a></span><span class="refpurpose"> â€” code generation for SSE</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-x86.html">x86</a></span><span class="refpurpose"> â€” code generation for x86</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/ch05.html b/doc/html/ch05.html
new file mode 100644 (file)
index 0000000..6d3f6d4
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Herein lie dragons</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="index.html" title="Orc Reference Manual">
+<link rel="prev" href="orc-x86.html" title="x86">
+<link rel="next" href="orc-misc.html" title="misc">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="orc-x86.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-misc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter" title="Herein lie dragons">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id2874346"></a>Herein lie dragons</h2></div></div></div>
+<div class="toc"><dl><dt>
+<span class="refentrytitle"><a href="orc-misc.html">misc</a></span><span class="refpurpose"></span>
+</dt></dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/home.png b/doc/html/home.png
new file mode 100644 (file)
index 0000000..1700361
Binary files /dev/null and b/doc/html/home.png differ
diff --git a/doc/html/index.html b/doc/html/index.html
new file mode 100644 (file)
index 0000000..2cafe83
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Orc Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="next" href="ch01.html" title="Overview">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="book" title="Orc Reference Manual">
+<div class="titlepage">
+<div>
+<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Orc Reference Manual</p></th></tr></table></div>
+<div><p class="releaseinfo">
+      for Orc-0.4.11.
+      The latest version of this documentation can be found on-line at
+      <a class="ulink" href="http://code.entropywave.com/documentation/orc/" target="_top">http://code.entropywave.com/documentation/orc/</a>.
+    </p></div>
+</div>
+<hr>
+</div>
+<div class="toc"><dl>
+<dt><span class="chapter"><a href="ch01.html">Overview</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-building.html">Building Orc and Applications That Use Orc</a></span><span class="refpurpose"> â€” 
+How to build Orc and applications using it.
+</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-concepts.html">Orc Concepts</a></span><span class="refpurpose"> â€” 
+High-level view of what Orc does.
+</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-tutorial.html">Orc Tutorial</a></span><span class="refpurpose"> â€” 
+Getting started writing Orc code.
+</span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="ch02.html">Application API</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-Orc.html">Orc</a></span><span class="refpurpose"> â€” Library Initialization</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcProgram.html">OrcProgram</a></span><span class="refpurpose"> â€” Creating and manipulating Orc programs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcCompiler.html">OrcCompiler</a></span><span class="refpurpose"> â€” Compile Orc programs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcExecutor.html">OrcExecutor</a></span><span class="refpurpose"> â€” Running Orc programs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-opcodes.html">Orc Opcodes</a></span><span class="refpurpose"> â€” 
+Description of Opcodes
+</span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="ch03.html">Extension API</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcDebug.html">OrcDebug</a></span><span class="refpurpose"> â€” Printing and formatting debug information</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcOpcode.html">OrcOpcode</a></span><span class="refpurpose"> â€” Operations</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-Utility-functions.html">Utility functions</a></span><span class="refpurpose"> â€” Orc utility functions</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-OrcRule.html">OrcRule</a></span><span class="refpurpose"> â€” Creating rules for code generation</span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="ch04.html">Code Generation</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="orc-ARM.html">ARM</a></span><span class="refpurpose"> â€” code generation for ARM</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-MMX.html">MMX</a></span><span class="refpurpose"> â€” code generation for MMX</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-PowerPC.html">PowerPC</a></span><span class="refpurpose"> â€” code generation for PowerPC</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-SSE.html">SSE</a></span><span class="refpurpose"> â€” code generation for SSE</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="orc-x86.html">x86</a></span><span class="refpurpose"> â€” code generation for x86</span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="ch05.html">Herein lie dragons</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="orc-misc.html">misc</a></span><span class="refpurpose"></span>
+</dt></dl></dd>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/index.sgml b/doc/html/index.sgml
new file mode 100644 (file)
index 0000000..25c1b38
--- /dev/null
@@ -0,0 +1,322 @@
+<ANCHOR id="orc-building" href="orc/orc-building.html">
+<ANCHOR id="orc-concepts" href="orc/orc-concepts.html">
+<ANCHOR id="orc-tutorial" href="orc/orc-tutorial.html">
+<ANCHOR id="orc-Orc" href="orc/orc-Orc.html">
+<ANCHOR id="orc-Orc.synopsis" href="orc/orc-Orc.html#orc-Orc.synopsis">
+<ANCHOR id="orc-Orc.description" href="orc/orc-Orc.html#orc-Orc.description">
+<ANCHOR id="orc-Orc.details" href="orc/orc-Orc.html#orc-Orc.details">
+<ANCHOR id="orc-init" href="orc/orc-Orc.html#orc-init">
+<ANCHOR id="orc-OrcProgram" href="orc/orc-OrcProgram.html">
+<ANCHOR id="orc-OrcProgram.synopsis" href="orc/orc-OrcProgram.html#orc-OrcProgram.synopsis">
+<ANCHOR id="orc-OrcProgram.description" href="orc/orc-OrcProgram.html#orc-OrcProgram.description">
+<ANCHOR id="orc-OrcProgram.details" href="orc/orc-OrcProgram.html#orc-OrcProgram.details">
+<ANCHOR id="OrcProgram" href="orc/orc-OrcProgram.html#OrcProgram">
+<ANCHOR id="ORC-N-CONSTANTS:CAPS" href="orc/orc-OrcProgram.html#ORC-N-CONSTANTS:CAPS">
+<ANCHOR id="ORC-N-RULE-SETS:CAPS" href="orc/orc-OrcProgram.html#ORC-N-RULE-SETS:CAPS">
+<ANCHOR id="ORC-N-TARGETS:CAPS" href="orc/orc-OrcProgram.html#ORC-N-TARGETS:CAPS">
+<ANCHOR id="ORC-PROGRAM-ERROR:CAPS" href="orc/orc-OrcProgram.html#ORC-PROGRAM-ERROR:CAPS">
+<ANCHOR id="orc-program-new" href="orc/orc-OrcProgram.html#orc-program-new">
+<ANCHOR id="orc-program-new-dss" href="orc/orc-OrcProgram.html#orc-program-new-dss">
+<ANCHOR id="orc-program-new-as" href="orc/orc-OrcProgram.html#orc-program-new-as">
+<ANCHOR id="orc-program-new-ass" href="orc/orc-OrcProgram.html#orc-program-new-ass">
+<ANCHOR id="orc-program-new-ds" href="orc/orc-OrcProgram.html#orc-program-new-ds">
+<ANCHOR id="orc-program-free" href="orc/orc-OrcProgram.html#orc-program-free">
+<ANCHOR id="orc-program-get-name" href="orc/orc-OrcProgram.html#orc-program-get-name">
+<ANCHOR id="orc-program-set-name" href="orc/orc-OrcProgram.html#orc-program-set-name">
+<ANCHOR id="orc-program-add-temporary" href="orc/orc-OrcProgram.html#orc-program-add-temporary">
+<ANCHOR id="orc-program-add-source" href="orc/orc-OrcProgram.html#orc-program-add-source">
+<ANCHOR id="orc-program-add-destination" href="orc/orc-OrcProgram.html#orc-program-add-destination">
+<ANCHOR id="orc-program-add-constant" href="orc/orc-OrcProgram.html#orc-program-add-constant">
+<ANCHOR id="orc-program-add-accumulator" href="orc/orc-OrcProgram.html#orc-program-add-accumulator">
+<ANCHOR id="orc-program-add-parameter" href="orc/orc-OrcProgram.html#orc-program-add-parameter">
+<ANCHOR id="orc-program-append" href="orc/orc-OrcProgram.html#orc-program-append">
+<ANCHOR id="orc-program-append-str" href="orc/orc-OrcProgram.html#orc-program-append-str">
+<ANCHOR id="orc-program-append-ds" href="orc/orc-OrcProgram.html#orc-program-append-ds">
+<ANCHOR id="orc-program-append-ds-str" href="orc/orc-OrcProgram.html#orc-program-append-ds-str">
+<ANCHOR id="orc-program-compile" href="orc/orc-OrcProgram.html#orc-program-compile">
+<ANCHOR id="orc-program-compile-for-target" href="orc/orc-OrcProgram.html#orc-program-compile-for-target">
+<ANCHOR id="orc-program-compile-full" href="orc/orc-OrcProgram.html#orc-program-compile-full">
+<ANCHOR id="orc-program-get-asm-code" href="orc/orc-OrcProgram.html#orc-program-get-asm-code">
+<ANCHOR id="orc-program-find-var-by-name" href="orc/orc-OrcProgram.html#orc-program-find-var-by-name">
+<ANCHOR id="orc-program-allocate-register" href="orc/orc-OrcProgram.html#orc-program-allocate-register">
+<ANCHOR id="orc-program-dup-temporary" href="orc/orc-OrcProgram.html#orc-program-dup-temporary">
+<ANCHOR id="orc-OrcCompiler" href="orc/orc-OrcCompiler.html">
+<ANCHOR id="orc-OrcCompiler.synopsis" href="orc/orc-OrcCompiler.html#orc-OrcCompiler.synopsis">
+<ANCHOR id="orc-OrcCompiler.description" href="orc/orc-OrcCompiler.html#orc-OrcCompiler.description">
+<ANCHOR id="orc-OrcCompiler.details" href="orc/orc-OrcCompiler.html#orc-OrcCompiler.details">
+<ANCHOR id="OrcCompileResult" href="orc/orc-OrcCompiler.html#OrcCompileResult">
+<ANCHOR id="OrcCompiler" href="orc/orc-OrcCompiler.html#OrcCompiler">
+<ANCHOR id="OrcConstant" href="orc/orc-OrcCompiler.html#OrcConstant">
+<ANCHOR id="ORC-COMPILER-ERROR:CAPS" href="orc/orc-OrcCompiler.html#ORC-COMPILER-ERROR:CAPS">
+<ANCHOR id="ORC-COMPILE-RESULT-IS-FATAL:CAPS" href="orc/orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS">
+<ANCHOR id="ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS" href="orc/orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS">
+<ANCHOR id="ORC-ASM-CODE:CAPS" href="orc/orc-OrcCompiler.html#ORC-ASM-CODE:CAPS">
+<ANCHOR id="ORC-ENABLE-ASM-CODE:CAPS" href="orc/orc-OrcCompiler.html#ORC-ENABLE-ASM-CODE:CAPS">
+<ANCHOR id="orc-compiler-append-code" href="orc/orc-OrcCompiler.html#orc-compiler-append-code">
+<ANCHOR id="orc-compiler-label-new" href="orc/orc-OrcCompiler.html#orc-compiler-label-new">
+<ANCHOR id="orc-OrcExecutor" href="orc/orc-OrcExecutor.html">
+<ANCHOR id="orc-OrcExecutor.synopsis" href="orc/orc-OrcExecutor.html#orc-OrcExecutor.synopsis">
+<ANCHOR id="orc-OrcExecutor.description" href="orc/orc-OrcExecutor.html#orc-OrcExecutor.description">
+<ANCHOR id="orc-OrcExecutor.details" href="orc/orc-OrcExecutor.html#orc-OrcExecutor.details">
+<ANCHOR id="OrcExecutor" href="orc/orc-OrcExecutor.html#OrcExecutor">
+<ANCHOR id="orc-executor-new" href="orc/orc-OrcExecutor.html#orc-executor-new">
+<ANCHOR id="orc-executor-free" href="orc/orc-OrcExecutor.html#orc-executor-free">
+<ANCHOR id="orc-executor-set-array" href="orc/orc-OrcExecutor.html#orc-executor-set-array">
+<ANCHOR id="orc-executor-set-array-str" href="orc/orc-OrcExecutor.html#orc-executor-set-array-str">
+<ANCHOR id="orc-executor-set-n" href="orc/orc-OrcExecutor.html#orc-executor-set-n">
+<ANCHOR id="orc-executor-emulate" href="orc/orc-OrcExecutor.html#orc-executor-emulate">
+<ANCHOR id="orc-executor-run" href="orc/orc-OrcExecutor.html#orc-executor-run">
+<ANCHOR id="orc-executor-get-accumulator" href="orc/orc-OrcExecutor.html#orc-executor-get-accumulator">
+<ANCHOR id="orc-executor-get-accumulator-str" href="orc/orc-OrcExecutor.html#orc-executor-get-accumulator-str">
+<ANCHOR id="orc-executor-set-param" href="orc/orc-OrcExecutor.html#orc-executor-set-param">
+<ANCHOR id="orc-executor-set-param-str" href="orc/orc-OrcExecutor.html#orc-executor-set-param-str">
+<ANCHOR id="orc-executor-set-program" href="orc/orc-OrcExecutor.html#orc-executor-set-program">
+<ANCHOR id="orc-opcodes" href="orc/orc-opcodes.html">
+<ANCHOR id="orc-OrcDebug" href="orc/orc-OrcDebug.html">
+<ANCHOR id="orc-OrcDebug.synopsis" href="orc/orc-OrcDebug.html#orc-OrcDebug.synopsis">
+<ANCHOR id="orc-OrcDebug.description" href="orc/orc-OrcDebug.html#orc-OrcDebug.description">
+<ANCHOR id="orc-OrcDebug.details" href="orc/orc-OrcDebug.html#orc-OrcDebug.details">
+<ANCHOR id="OrcDebugLevel" href="orc/orc-OrcDebug.html#OrcDebugLevel">
+<ANCHOR id="ORC-DEBUG-NONE:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG-NONE:CAPS">
+<ANCHOR id="ORC-DEBUG-ERROR:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG-ERROR:CAPS">
+<ANCHOR id="ORC-DEBUG-WARNING:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG-WARNING:CAPS">
+<ANCHOR id="ORC-DEBUG-INFO:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG-INFO:CAPS">
+<ANCHOR id="ORC-DEBUG-DEBUG:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG-DEBUG:CAPS">
+<ANCHOR id="ORC-DEBUG-LOG:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG-LOG:CAPS">
+<ANCHOR id="OrcDebugPrintFunc" href="orc/orc-OrcDebug.html#OrcDebugPrintFunc">
+<ANCHOR id="ORC-DEBUG-PRINT:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS">
+<ANCHOR id="ORC-ERROR:CAPS" href="orc/orc-OrcDebug.html#ORC-ERROR:CAPS">
+<ANCHOR id="ORC-WARNING:CAPS" href="orc/orc-OrcDebug.html#ORC-WARNING:CAPS">
+<ANCHOR id="ORC-INFO:CAPS" href="orc/orc-OrcDebug.html#ORC-INFO:CAPS">
+<ANCHOR id="ORC-DEBUG:CAPS" href="orc/orc-OrcDebug.html#ORC-DEBUG:CAPS">
+<ANCHOR id="ORC-LOG:CAPS" href="orc/orc-OrcDebug.html#ORC-LOG:CAPS">
+<ANCHOR id="ORC-FUNCTION:CAPS" href="orc/orc-OrcDebug.html#ORC-FUNCTION:CAPS">
+<ANCHOR id="orc-debug-get-level" href="orc/orc-OrcDebug.html#orc-debug-get-level">
+<ANCHOR id="orc-debug-print" href="orc/orc-OrcDebug.html#orc-debug-print">
+<ANCHOR id="orc-debug-set-level" href="orc/orc-OrcDebug.html#orc-debug-set-level">
+<ANCHOR id="orc-debug-set-print-function" href="orc/orc-OrcDebug.html#orc-debug-set-print-function">
+<ANCHOR id="orc-OrcOpcode" href="orc/orc-OrcOpcode.html">
+<ANCHOR id="orc-OrcOpcode.synopsis" href="orc/orc-OrcOpcode.html#orc-OrcOpcode.synopsis">
+<ANCHOR id="orc-OrcOpcode.description" href="orc/orc-OrcOpcode.html#orc-OrcOpcode.description">
+<ANCHOR id="orc-OrcOpcode.details" href="orc/orc-OrcOpcode.html#orc-OrcOpcode.details">
+<ANCHOR id="OrcOpcodeEmulateFunc" href="orc/orc-OrcOpcode.html#OrcOpcodeEmulateFunc">
+<ANCHOR id="OrcOpcodeExecutor" href="orc/orc-OrcOpcode.html#OrcOpcodeExecutor">
+<ANCHOR id="OrcOpcodeSet" href="orc/orc-OrcOpcode.html#OrcOpcodeSet">
+<ANCHOR id="OrcRuleSet" href="orc/orc-OrcOpcode.html#OrcRuleSet">
+<ANCHOR id="OrcStaticOpcode" href="orc/orc-OrcOpcode.html#OrcStaticOpcode">
+<ANCHOR id="OrcTarget" href="orc/orc-OrcOpcode.html#OrcTarget">
+<ANCHOR id="ORC-OPCODE-N-ARGS:CAPS" href="orc/orc-OrcOpcode.html#ORC-OPCODE-N-ARGS:CAPS">
+<ANCHOR id="ORC-STATIC-OPCODE-ACCUMULATOR:CAPS" href="orc/orc-OrcOpcode.html#ORC-STATIC-OPCODE-ACCUMULATOR:CAPS">
+<ANCHOR id="ORC-STATIC-OPCODE-N-DEST:CAPS" href="orc/orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-DEST:CAPS">
+<ANCHOR id="ORC-STATIC-OPCODE-N-SRC:CAPS" href="orc/orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-SRC:CAPS">
+<ANCHOR id="orc-opcode-find-by-name" href="orc/orc-OrcOpcode.html#orc-opcode-find-by-name">
+<ANCHOR id="orc-opcode-init" href="orc/orc-OrcOpcode.html#orc-opcode-init">
+<ANCHOR id="orc-opcode-register-static" href="orc/orc-OrcOpcode.html#orc-opcode-register-static">
+<ANCHOR id="orc-opcode-set-find-by-name" href="orc/orc-OrcOpcode.html#orc-opcode-set-find-by-name">
+<ANCHOR id="orc-opcode-set-get" href="orc/orc-OrcOpcode.html#orc-opcode-set-get">
+<ANCHOR id="orc-rule-set-new" href="orc/orc-OrcOpcode.html#orc-rule-set-new">
+<ANCHOR id="orc-target-get-asm-preamble" href="orc/orc-OrcOpcode.html#orc-target-get-asm-preamble">
+<ANCHOR id="orc-target-get-by-name" href="orc/orc-OrcOpcode.html#orc-target-get-by-name">
+<ANCHOR id="orc-target-get-default" href="orc/orc-OrcOpcode.html#orc-target-get-default">
+<ANCHOR id="orc-target-get-default-flags" href="orc/orc-OrcOpcode.html#orc-target-get-default-flags">
+<ANCHOR id="orc-target-get-name" href="orc/orc-OrcOpcode.html#orc-target-get-name">
+<ANCHOR id="orc-target-get-rule" href="orc/orc-OrcOpcode.html#orc-target-get-rule">
+<ANCHOR id="orc-target-register" href="orc/orc-OrcOpcode.html#orc-target-register">
+<ANCHOR id="orc-Utility-functions" href="orc/orc-Utility-functions.html">
+<ANCHOR id="orc-Utility-functions.synopsis" href="orc/orc-Utility-functions.html#orc-Utility-functions.synopsis">
+<ANCHOR id="orc-Utility-functions.description" href="orc/orc-Utility-functions.html#orc-Utility-functions.description">
+<ANCHOR id="orc-Utility-functions.details" href="orc/orc-Utility-functions.html#orc-Utility-functions.details">
+<ANCHOR id="orc-bool" href="orc/orc-Utility-functions.html#orc-bool">
+<ANCHOR id="ORC-ASSERT:CAPS" href="orc/orc-Utility-functions.html#ORC-ASSERT:CAPS">
+<ANCHOR id="ORC-BEGIN-DECLS:CAPS" href="orc/orc-Utility-functions.html#ORC-BEGIN-DECLS:CAPS">
+<ANCHOR id="ORC-CLAMP:CAPS" href="orc/orc-Utility-functions.html#ORC-CLAMP:CAPS">
+<ANCHOR id="ORC-END-DECLS:CAPS" href="orc/orc-Utility-functions.html#ORC-END-DECLS:CAPS">
+<ANCHOR id="ORC-EXPORT:CAPS" href="orc/orc-Utility-functions.html#ORC-EXPORT:CAPS">
+<ANCHOR id="ORC-GNUC-PREREQ:CAPS" href="orc/orc-Utility-functions.html#ORC-GNUC-PREREQ:CAPS">
+<ANCHOR id="ORC-GNU-PRINTF:CAPS" href="orc/orc-Utility-functions.html#ORC-GNU-PRINTF:CAPS">
+<ANCHOR id="ORC-INTERNAL:CAPS" href="orc/orc-Utility-functions.html#ORC-INTERNAL:CAPS">
+<ANCHOR id="ORC-PTR-TO-INT:CAPS" href="orc/orc-Utility-functions.html#ORC-PTR-TO-INT:CAPS">
+<ANCHOR id="ORC-READ-UINT32-LE:CAPS" href="orc/orc-Utility-functions.html#ORC-READ-UINT32-LE:CAPS">
+<ANCHOR id="ORC-WRITE-UINT32-LE:CAPS" href="orc/orc-Utility-functions.html#ORC-WRITE-UINT32-LE:CAPS">
+<ANCHOR id="orc-OrcRule" href="orc/orc-OrcRule.html">
+<ANCHOR id="orc-OrcRule.synopsis" href="orc/orc-OrcRule.html#orc-OrcRule.synopsis">
+<ANCHOR id="orc-OrcRule.description" href="orc/orc-OrcRule.html#orc-OrcRule.description">
+<ANCHOR id="orc-OrcRule.details" href="orc/orc-OrcRule.html#orc-OrcRule.details">
+<ANCHOR id="orc-rule-register" href="orc/orc-OrcRule.html#orc-rule-register">
+<ANCHOR id="orc-ARM" href="orc/orc-ARM.html">
+<ANCHOR id="orc-ARM.synopsis" href="orc/orc-ARM.html#orc-ARM.synopsis">
+<ANCHOR id="orc-ARM.description" href="orc/orc-ARM.html#orc-ARM.description">
+<ANCHOR id="orc-ARM.details" href="orc/orc-ARM.html#orc-ARM.details">
+<ANCHOR id="OrcArmCond" href="orc/orc-ARM.html#OrcArmCond">
+<ANCHOR id="OrcArmDP" href="orc/orc-ARM.html#OrcArmDP">
+<ANCHOR id="OrcArmRegister" href="orc/orc-ARM.html#OrcArmRegister">
+<ANCHOR id="orc-arm-do-fixups" href="orc/orc-ARM.html#orc-arm-do-fixups">
+<ANCHOR id="orc-arm-emit" href="orc/orc-ARM.html#orc-arm-emit">
+<ANCHOR id="orc-arm-emit-add" href="orc/orc-ARM.html#orc-arm-emit-add">
+<ANCHOR id="orc-arm-emit-add-imm" href="orc/orc-ARM.html#orc-arm-emit-add-imm">
+<ANCHOR id="orc-arm-emit-branch" href="orc/orc-ARM.html#orc-arm-emit-branch">
+<ANCHOR id="orc-arm-emit-bx-lr" href="orc/orc-ARM.html#orc-arm-emit-bx-lr">
+<ANCHOR id="orc-arm-emit-cmp-imm" href="orc/orc-ARM.html#orc-arm-emit-cmp-imm">
+<ANCHOR id="orc-arm-emit-label" href="orc/orc-ARM.html#orc-arm-emit-label">
+<ANCHOR id="orc-arm-emit-load-reg" href="orc/orc-ARM.html#orc-arm-emit-load-reg">
+<ANCHOR id="orc-arm-emit-mov" href="orc/orc-ARM.html#orc-arm-emit-mov">
+<ANCHOR id="orc-arm-emit-pop" href="orc/orc-ARM.html#orc-arm-emit-pop">
+<ANCHOR id="orc-arm-emit-push" href="orc/orc-ARM.html#orc-arm-emit-push">
+<ANCHOR id="orc-arm-emit-sub" href="orc/orc-ARM.html#orc-arm-emit-sub">
+<ANCHOR id="orc-arm-emit-sub-imm" href="orc/orc-ARM.html#orc-arm-emit-sub-imm">
+<ANCHOR id="orc-arm-loadw" href="orc/orc-ARM.html#orc-arm-loadw">
+<ANCHOR id="orc-arm-reg-name" href="orc/orc-ARM.html#orc-arm-reg-name">
+<ANCHOR id="orc-arm-storew" href="orc/orc-ARM.html#orc-arm-storew">
+<ANCHOR id="orc-MMX" href="orc/orc-MMX.html">
+<ANCHOR id="orc-MMX.synopsis" href="orc/orc-MMX.html#orc-MMX.synopsis">
+<ANCHOR id="orc-MMX.description" href="orc/orc-MMX.html#orc-MMX.description">
+<ANCHOR id="orc-MMX.details" href="orc/orc-MMX.html#orc-MMX.details">
+<ANCHOR id="OrcMMXRegister" href="orc/orc-MMX.html#OrcMMXRegister">
+<ANCHOR id="OrcTargetMMXFlags" href="orc/orc-MMX.html#OrcTargetMMXFlags">
+<ANCHOR id="ORC-MMX-SHUF:CAPS" href="orc/orc-MMX.html#ORC-MMX-SHUF:CAPS">
+<ANCHOR id="orc-mmx-emit-0f" href="orc/orc-MMX.html#orc-mmx-emit-0f">
+<ANCHOR id="orc-mmx-emit-660f" href="orc/orc-MMX.html#orc-mmx-emit-660f">
+<ANCHOR id="orc-mmx-emit-f20f" href="orc/orc-MMX.html#orc-mmx-emit-f20f">
+<ANCHOR id="orc-mmx-emit-f30f" href="orc/orc-MMX.html#orc-mmx-emit-f30f">
+<ANCHOR id="orc-mmx-emit-loadib" href="orc/orc-MMX.html#orc-mmx-emit-loadib">
+<ANCHOR id="orc-mmx-emit-loadil" href="orc/orc-MMX.html#orc-mmx-emit-loadil">
+<ANCHOR id="orc-mmx-emit-loadiw" href="orc/orc-MMX.html#orc-mmx-emit-loadiw">
+<ANCHOR id="orc-mmx-emit-loadpb" href="orc/orc-MMX.html#orc-mmx-emit-loadpb">
+<ANCHOR id="orc-mmx-emit-loadpl" href="orc/orc-MMX.html#orc-mmx-emit-loadpl">
+<ANCHOR id="orc-mmx-emit-loadpq" href="orc/orc-MMX.html#orc-mmx-emit-loadpq">
+<ANCHOR id="orc-mmx-emit-loadpw" href="orc/orc-MMX.html#orc-mmx-emit-loadpw">
+<ANCHOR id="orc-mmx-emit-pshufw" href="orc/orc-MMX.html#orc-mmx-emit-pshufw">
+<ANCHOR id="orc-mmx-emit-shiftimm" href="orc/orc-MMX.html#orc-mmx-emit-shiftimm">
+<ANCHOR id="orc-mmx-get-cpu-flags" href="orc/orc-MMX.html#orc-mmx-get-cpu-flags">
+<ANCHOR id="orc-mmx-init" href="orc/orc-MMX.html#orc-mmx-init">
+<ANCHOR id="orc-PowerPC" href="orc/orc-PowerPC.html">
+<ANCHOR id="orc-PowerPC.synopsis" href="orc/orc-PowerPC.html#orc-PowerPC.synopsis">
+<ANCHOR id="orc-PowerPC.description" href="orc/orc-PowerPC.html#orc-PowerPC.description">
+<ANCHOR id="orc-PowerPC.details" href="orc/orc-PowerPC.html#orc-PowerPC.details">
+<ANCHOR id="powerpc-get-regname" href="orc/orc-PowerPC.html#powerpc-get-regname">
+<ANCHOR id="powerpc-regnum" href="orc/orc-PowerPC.html#powerpc-regnum">
+<ANCHOR id="powerpc-add-fixup" href="orc/orc-PowerPC.html#powerpc-add-fixup">
+<ANCHOR id="powerpc-do-fixups" href="orc/orc-PowerPC.html#powerpc-do-fixups">
+<ANCHOR id="powerpc-emit" href="orc/orc-PowerPC.html#powerpc-emit">
+<ANCHOR id="powerpc-emit-655510" href="orc/orc-PowerPC.html#powerpc-emit-655510">
+<ANCHOR id="powerpc-emit-VA" href="orc/orc-PowerPC.html#powerpc-emit-VA">
+<ANCHOR id="powerpc-emit-VX" href="orc/orc-PowerPC.html#powerpc-emit-VX">
+<ANCHOR id="powerpc-emit-VX-2" href="orc/orc-PowerPC.html#powerpc-emit-VX-2">
+<ANCHOR id="powerpc-emit-X" href="orc/orc-PowerPC.html#powerpc-emit-X">
+<ANCHOR id="powerpc-emit-addi" href="orc/orc-PowerPC.html#powerpc-emit-addi">
+<ANCHOR id="powerpc-emit-b" href="orc/orc-PowerPC.html#powerpc-emit-b">
+<ANCHOR id="powerpc-emit-beq" href="orc/orc-PowerPC.html#powerpc-emit-beq">
+<ANCHOR id="powerpc-emit-bne" href="orc/orc-PowerPC.html#powerpc-emit-bne">
+<ANCHOR id="powerpc-emit-label" href="orc/orc-PowerPC.html#powerpc-emit-label">
+<ANCHOR id="powerpc-emit-lwz" href="orc/orc-PowerPC.html#powerpc-emit-lwz">
+<ANCHOR id="powerpc-emit-ret" href="orc/orc-PowerPC.html#powerpc-emit-ret">
+<ANCHOR id="powerpc-emit-srawi" href="orc/orc-PowerPC.html#powerpc-emit-srawi">
+<ANCHOR id="powerpc-emit-stwu" href="orc/orc-PowerPC.html#powerpc-emit-stwu">
+<ANCHOR id="powerpc-get-constant" href="orc/orc-PowerPC.html#powerpc-get-constant">
+<ANCHOR id="orc-SSE" href="orc/orc-SSE.html">
+<ANCHOR id="orc-SSE.synopsis" href="orc/orc-SSE.html#orc-SSE.synopsis">
+<ANCHOR id="orc-SSE.description" href="orc/orc-SSE.html#orc-SSE.description">
+<ANCHOR id="orc-SSE.details" href="orc/orc-SSE.html#orc-SSE.details">
+<ANCHOR id="OrcSSERegister" href="orc/orc-SSE.html#OrcSSERegister">
+<ANCHOR id="OrcTargetSSEFlags" href="orc/orc-SSE.html#OrcTargetSSEFlags">
+<ANCHOR id="ORC-SSE-SHUF:CAPS" href="orc/orc-SSE.html#ORC-SSE-SHUF:CAPS">
+<ANCHOR id="orc-sse-emit-0f" href="orc/orc-SSE.html#orc-sse-emit-0f">
+<ANCHOR id="orc-sse-emit-660f" href="orc/orc-SSE.html#orc-sse-emit-660f">
+<ANCHOR id="orc-sse-emit-f20f" href="orc/orc-SSE.html#orc-sse-emit-f20f">
+<ANCHOR id="orc-sse-emit-f30f" href="orc/orc-SSE.html#orc-sse-emit-f30f">
+<ANCHOR id="orc-sse-emit-loadib" href="orc/orc-SSE.html#orc-sse-emit-loadib">
+<ANCHOR id="orc-sse-emit-loadil" href="orc/orc-SSE.html#orc-sse-emit-loadil">
+<ANCHOR id="orc-sse-emit-loadiw" href="orc/orc-SSE.html#orc-sse-emit-loadiw">
+<ANCHOR id="orc-sse-emit-loadpb" href="orc/orc-SSE.html#orc-sse-emit-loadpb">
+<ANCHOR id="orc-sse-emit-loadpl" href="orc/orc-SSE.html#orc-sse-emit-loadpl">
+<ANCHOR id="orc-sse-emit-loadpq" href="orc/orc-SSE.html#orc-sse-emit-loadpq">
+<ANCHOR id="orc-sse-emit-loadpw" href="orc/orc-SSE.html#orc-sse-emit-loadpw">
+<ANCHOR id="orc-sse-emit-pshufd" href="orc/orc-SSE.html#orc-sse-emit-pshufd">
+<ANCHOR id="orc-sse-emit-pshuflw" href="orc/orc-SSE.html#orc-sse-emit-pshuflw">
+<ANCHOR id="orc-sse-emit-shiftimm" href="orc/orc-SSE.html#orc-sse-emit-shiftimm">
+<ANCHOR id="orc-sse-get-cpu-flags" href="orc/orc-SSE.html#orc-sse-get-cpu-flags">
+<ANCHOR id="orc-sse-init" href="orc/orc-SSE.html#orc-sse-init">
+<ANCHOR id="orc-x86" href="orc/orc-x86.html">
+<ANCHOR id="orc-x86.synopsis" href="orc/orc-x86.html#orc-x86.synopsis">
+<ANCHOR id="orc-x86.description" href="orc/orc-x86.html#orc-x86.description">
+<ANCHOR id="orc-x86.details" href="orc/orc-x86.html#orc-x86.details">
+<ANCHOR id="orc-x86-emit-add-imm-memoffset" href="orc/orc-x86.html#orc-x86-emit-add-imm-memoffset">
+<ANCHOR id="orc-x86-emit-add-imm-reg" href="orc/orc-x86.html#orc-x86-emit-add-imm-reg">
+<ANCHOR id="orc-x86-emit-add-reg-memoffset" href="orc/orc-x86.html#orc-x86-emit-add-reg-memoffset">
+<ANCHOR id="orc-x86-emit-align" href="orc/orc-x86.html#orc-x86-emit-align">
+<ANCHOR id="orc-x86-emit-and-imm-memoffset" href="orc/orc-x86.html#orc-x86-emit-and-imm-memoffset">
+<ANCHOR id="orc-x86-emit-and-imm-reg" href="orc/orc-x86.html#orc-x86-emit-and-imm-reg">
+<ANCHOR id="orc-x86-emit-cmp-imm-memoffset" href="orc/orc-x86.html#orc-x86-emit-cmp-imm-memoffset">
+<ANCHOR id="orc-x86-emit-cmp-reg-memoffset" href="orc/orc-x86.html#orc-x86-emit-cmp-reg-memoffset">
+<ANCHOR id="orc-x86-emit-dec-memoffset" href="orc/orc-x86.html#orc-x86-emit-dec-memoffset">
+<ANCHOR id="orc-x86-emit-emms" href="orc/orc-x86.html#orc-x86-emit-emms">
+<ANCHOR id="orc-x86-emit-epilogue" href="orc/orc-x86.html#orc-x86-emit-epilogue">
+<ANCHOR id="orc-x86-emit-je" href="orc/orc-x86.html#orc-x86-emit-je">
+<ANCHOR id="orc-x86-emit-jle" href="orc/orc-x86.html#orc-x86-emit-jle">
+<ANCHOR id="orc-x86-emit-jmp" href="orc/orc-x86.html#orc-x86-emit-jmp">
+<ANCHOR id="orc-x86-emit-jne" href="orc/orc-x86.html#orc-x86-emit-jne">
+<ANCHOR id="orc-x86-emit-label" href="orc/orc-x86.html#orc-x86-emit-label">
+<ANCHOR id="orc-x86-emit-modrm-memoffset" href="orc/orc-x86.html#orc-x86-emit-modrm-memoffset">
+<ANCHOR id="orc-x86-emit-modrm-reg" href="orc/orc-x86.html#orc-x86-emit-modrm-reg">
+<ANCHOR id="orc-x86-emit-mov-imm-reg" href="orc/orc-x86.html#orc-x86-emit-mov-imm-reg">
+<ANCHOR id="orc-x86-emit-mov-memoffset-mmx" href="orc/orc-x86.html#orc-x86-emit-mov-memoffset-mmx">
+<ANCHOR id="orc-x86-emit-mov-memoffset-reg" href="orc/orc-x86.html#orc-x86-emit-mov-memoffset-reg">
+<ANCHOR id="orc-x86-emit-mov-memoffset-sse" href="orc/orc-x86.html#orc-x86-emit-mov-memoffset-sse">
+<ANCHOR id="orc-x86-emit-mov-mmx-memoffset" href="orc/orc-x86.html#orc-x86-emit-mov-mmx-memoffset">
+<ANCHOR id="orc-x86-emit-mov-mmx-reg" href="orc/orc-x86.html#orc-x86-emit-mov-mmx-reg">
+<ANCHOR id="orc-x86-emit-mov-mmx-reg-reg" href="orc/orc-x86.html#orc-x86-emit-mov-mmx-reg-reg">
+<ANCHOR id="orc-x86-emit-mov-reg-memoffset" href="orc/orc-x86.html#orc-x86-emit-mov-reg-memoffset">
+<ANCHOR id="orc-x86-emit-mov-reg-mmx" href="orc/orc-x86.html#orc-x86-emit-mov-reg-mmx">
+<ANCHOR id="orc-x86-emit-mov-reg-reg" href="orc/orc-x86.html#orc-x86-emit-mov-reg-reg">
+<ANCHOR id="orc-x86-emit-mov-reg-sse" href="orc/orc-x86.html#orc-x86-emit-mov-reg-sse">
+<ANCHOR id="orc-x86-emit-mov-sse-memoffset" href="orc/orc-x86.html#orc-x86-emit-mov-sse-memoffset">
+<ANCHOR id="orc-x86-emit-mov-sse-reg" href="orc/orc-x86.html#orc-x86-emit-mov-sse-reg">
+<ANCHOR id="orc-x86-emit-mov-sse-reg-reg" href="orc/orc-x86.html#orc-x86-emit-mov-sse-reg-reg">
+<ANCHOR id="orc-x86-emit-pop" href="orc/orc-x86.html#orc-x86-emit-pop">
+<ANCHOR id="orc-x86-emit-prologue" href="orc/orc-x86.html#orc-x86-emit-prologue">
+<ANCHOR id="orc-x86-emit-push" href="orc/orc-x86.html#orc-x86-emit-push">
+<ANCHOR id="orc-x86-emit-ret" href="orc/orc-x86.html#orc-x86-emit-ret">
+<ANCHOR id="orc-x86-emit-rex" href="orc/orc-x86.html#orc-x86-emit-rex">
+<ANCHOR id="orc-x86-emit-sar-imm-reg" href="orc/orc-x86.html#orc-x86-emit-sar-imm-reg">
+<ANCHOR id="orc-x86-emit-sub-memoffset-reg" href="orc/orc-x86.html#orc-x86-emit-sub-memoffset-reg">
+<ANCHOR id="orc-x86-emit-sub-reg-reg" href="orc/orc-x86.html#orc-x86-emit-sub-reg-reg">
+<ANCHOR id="orc-x86-emit-test-reg-reg" href="orc/orc-x86.html#orc-x86-emit-test-reg-reg">
+<ANCHOR id="orc-x86-get-regname" href="orc/orc-x86.html#orc-x86-get-regname">
+<ANCHOR id="orc-x86-get-regname-16" href="orc/orc-x86.html#orc-x86-get-regname-16">
+<ANCHOR id="orc-x86-get-regname-64" href="orc/orc-x86.html#orc-x86-get-regname-64">
+<ANCHOR id="orc-x86-get-regname-mmx" href="orc/orc-x86.html#orc-x86-get-regname-mmx">
+<ANCHOR id="orc-x86-get-regname-ptr" href="orc/orc-x86.html#orc-x86-get-regname-ptr">
+<ANCHOR id="orc-x86-get-regname-sse" href="orc/orc-x86.html#orc-x86-get-regname-sse">
+<ANCHOR id="orc-x86-get-regnum" href="orc/orc-x86.html#orc-x86-get-regnum">
+<ANCHOR id="orc-x86-do-fixups" href="orc/orc-x86.html#orc-x86-do-fixups">
+<ANCHOR id="orc-misc" href="orc/orc-misc.html">
+<ANCHOR id="orc-misc.synopsis" href="orc/orc-misc.html#orc-misc.synopsis">
+<ANCHOR id="orc-misc.description" href="orc/orc-misc.html#orc-misc.description">
+<ANCHOR id="orc-misc.details" href="orc/orc-misc.html#orc-misc.details">
+<ANCHOR id="OrcVariable" href="orc/orc-misc.html#OrcVariable">
+<ANCHOR id="OrcInstruction" href="orc/orc-misc.html#OrcInstruction">
+<ANCHOR id="OrcRule" href="orc/orc-misc.html#OrcRule">
+<ANCHOR id="OrcFixup" href="orc/orc-misc.html#OrcFixup">
+<ANCHOR id="OrcRuleEmitFunc" href="orc/orc-misc.html#OrcRuleEmitFunc">
+<ANCHOR id="ORC-N-REGS:CAPS" href="orc/orc-misc.html#ORC-N-REGS:CAPS">
+<ANCHOR id="ORC-N-INSNS:CAPS" href="orc/orc-misc.html#ORC-N-INSNS:CAPS">
+<ANCHOR id="ORC-N-VARIABLES:CAPS" href="orc/orc-misc.html#ORC-N-VARIABLES:CAPS">
+<ANCHOR id="ORC-N-REGISTERS:CAPS" href="orc/orc-misc.html#ORC-N-REGISTERS:CAPS">
+<ANCHOR id="ORC-N-FIXUPS:CAPS" href="orc/orc-misc.html#ORC-N-FIXUPS:CAPS">
+<ANCHOR id="ORC-N-LABELS:CAPS" href="orc/orc-misc.html#ORC-N-LABELS:CAPS">
+<ANCHOR id="ORC-GP-REG-BASE:CAPS" href="orc/orc-misc.html#ORC-GP-REG-BASE:CAPS">
+<ANCHOR id="ORC-VEC-REG-BASE:CAPS" href="orc/orc-misc.html#ORC-VEC-REG-BASE:CAPS">
+<ANCHOR id="ORC-STRUCT-OFFSET:CAPS" href="orc/orc-misc.html#ORC-STRUCT-OFFSET:CAPS">
+<ANCHOR id="OrcVarType" href="orc/orc-misc.html#OrcVarType">
+<ANCHOR id="orc-powerpc-init" href="orc/orc-misc.html#orc-powerpc-init">
+<ANCHOR id="orc-arm-init" href="orc/orc-misc.html#orc-arm-init">
+<ANCHOR id="orc-c-init" href="orc/orc-misc.html#orc-c-init">
+<ANCHOR id="orc-parse" href="orc/orc-misc.html#orc-parse">
+<ANCHOR id="ARRAY-SIZE:CAPS" href="orc/orc-misc.html#ARRAY-SIZE:CAPS">
+<ANCHOR id="MAX:CAPS" href="orc/orc-misc.html#MAX:CAPS">
+<ANCHOR id="MIN:CAPS" href="orc/orc-misc.html#MIN:CAPS">
+<ANCHOR id="get-cpuinfo-line" href="orc/orc-misc.html#get-cpuinfo-line">
+<ANCHOR id="get-file" href="orc/orc-misc.html#get-file">
+<ANCHOR id="get-file-int" href="orc/orc-misc.html#get-file-int">
+<ANCHOR id="get-tag-value" href="orc/orc-misc.html#get-tag-value">
+<ANCHOR id="strsplit" href="orc/orc-misc.html#strsplit">
diff --git a/doc/html/left.png b/doc/html/left.png
new file mode 100644 (file)
index 0000000..2d05b3d
Binary files /dev/null and b/doc/html/left.png differ
diff --git a/doc/html/orc-ARM.html b/doc/html/orc-ARM.html
new file mode 100644 (file)
index 0000000..d35b719
--- /dev/null
@@ -0,0 +1,660 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>ARM</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch04.html" title="Code Generation">
+<link rel="prev" href="ch04.html" title="Code Generation">
+<link rel="next" href="orc-MMX.html" title="MMX">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch04.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-MMX.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-ARM.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-ARM.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="ARM">
+<a name="orc-ARM"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-ARM.top_of_page"></a>ARM</span></h2>
+<p>ARM â€” code generation for ARM</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-ARM.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">enum                <a class="link" href="orc-ARM.html#OrcArmCond" title="enum OrcArmCond">OrcArmCond</a>;
+enum                <a class="link" href="orc-ARM.html#OrcArmDP" title="enum OrcArmDP">OrcArmDP</a>;
+enum                <a class="link" href="orc-ARM.html#OrcArmRegister" title="enum OrcArmRegister">OrcArmRegister</a>;
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-do-fixups" title="orc_arm_do_fixups ()">orc_arm_do_fixups</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit" title="orc_arm_emit ()">orc_arm_emit</a>                        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">orc_uint32</span> insn</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-add" title="orc_arm_emit_add ()">orc_arm_emit_add</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-add-imm" title="orc_arm_emit_add_imm ()">orc_arm_emit_add_imm</a>                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-branch" title="orc_arm_emit_branch ()">orc_arm_emit_branch</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> cond</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-bx-lr" title="orc_arm_emit_bx_lr ()">orc_arm_emit_bx_lr</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-cmp-imm" title="orc_arm_emit_cmp_imm ()">orc_arm_emit_cmp_imm</a>                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-label" title="orc_arm_emit_label ()">orc_arm_emit_label</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-load-reg" title="orc_arm_emit_load_reg ()">orc_arm_emit_load_reg</a>               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-mov" title="orc_arm_emit_mov ()">orc_arm_emit_mov</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-pop" title="orc_arm_emit_pop ()">orc_arm_emit_pop</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regs</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-push" title="orc_arm_emit_push ()">orc_arm_emit_push</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regs</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-sub" title="orc_arm_emit_sub ()">orc_arm_emit_sub</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-emit-sub-imm" title="orc_arm_emit_sub_imm ()">orc_arm_emit_sub_imm</a>                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> record</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-loadw" title="orc_arm_loadw ()">orc_arm_loadw</a>                       (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-ARM.html#orc-arm-reg-name" title="orc_arm_reg_name ()">orc_arm_reg_name</a>                    (<em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-ARM.html#orc-arm-storew" title="orc_arm_storew ()">orc_arm_storew</a>                      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-ARM.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-ARM.details"></a><h2>Details</h2>
+<div class="refsect2" title="enum OrcArmCond">
+<a name="OrcArmCond"></a><h3>enum OrcArmCond</h3>
+<pre class="programlisting">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;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum OrcArmDP">
+<a name="OrcArmDP"></a><h3>enum OrcArmDP</h3>
+<pre class="programlisting">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;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum OrcArmRegister">
+<a name="OrcArmRegister"></a><h3>enum OrcArmRegister</h3>
+<pre class="programlisting">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;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_do_fixups ()">
+<a name="orc-arm-do-fixups"></a><h3>orc_arm_do_fixups ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_do_fixups                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit ()">
+<a name="orc-arm-emit"></a><h3>orc_arm_emit ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit                        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">orc_uint32</span> insn</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_add ()">
+<a name="orc-arm-emit-add"></a><h3>orc_arm_emit_add ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_add                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_add_imm ()">
+<a name="orc-arm-emit-add-imm"></a><h3>orc_arm_emit_add_imm ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_add_imm                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_branch ()">
+<a name="orc-arm-emit-branch"></a><h3>orc_arm_emit_branch ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_branch                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> cond</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>cond</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_bx_lr ()">
+<a name="orc-arm-emit-bx-lr"></a><h3>orc_arm_emit_bx_lr ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_bx_lr                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_cmp_imm ()">
+<a name="orc-arm-emit-cmp-imm"></a><h3>orc_arm_emit_cmp_imm ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_cmp_imm                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_label ()">
+<a name="orc-arm-emit-label"></a><h3>orc_arm_emit_label ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_label                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_load_reg ()">
+<a name="orc-arm-emit-load-reg"></a><h3>orc_arm_emit_load_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_load_reg               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_mov ()">
+<a name="orc-arm-emit-mov"></a><h3>orc_arm_emit_mov ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_mov                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_pop ()">
+<a name="orc-arm-emit-pop"></a><h3>orc_arm_emit_pop ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_pop                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regs</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>regs</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_push ()">
+<a name="orc-arm-emit-push"></a><h3>orc_arm_emit_push ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_push                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regs</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>regs</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_sub ()">
+<a name="orc-arm-emit-sub"></a><h3>orc_arm_emit_sub ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_sub                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_emit_sub_imm ()">
+<a name="orc-arm-emit-sub-imm"></a><h3>orc_arm_emit_sub_imm ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_emit_sub_imm                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> record</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>record</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_loadw ()">
+<a name="orc-arm-loadw"></a><h3>orc_arm_loadw ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_loadw                       (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_reg_name ()">
+<a name="orc-arm-reg-name"></a><h3>orc_arm_reg_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_arm_reg_name                    (<em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_storew ()">
+<a name="orc-arm-storew"></a><h3>orc_arm_storew ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_storew                      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src1</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-MMX.html b/doc/html/orc-MMX.html
new file mode 100644 (file)
index 0000000..897f5fa
--- /dev/null
@@ -0,0 +1,651 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>MMX</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch04.html" title="Code Generation">
+<link rel="prev" href="orc-ARM.html" title="ARM">
+<link rel="next" href="orc-PowerPC.html" title="PowerPC">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-ARM.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-PowerPC.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-MMX.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-MMX.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="MMX">
+<a name="orc-MMX"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-MMX.top_of_page"></a>MMX</span></h2>
+<p>MMX â€” code generation for MMX</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-MMX.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">enum                <a class="link" href="orc-MMX.html#OrcMMXRegister" title="enum OrcMMXRegister">OrcMMXRegister</a>;
+enum                <a class="link" href="orc-MMX.html#OrcTargetMMXFlags" title="enum OrcTargetMMXFlags">OrcTargetMMXFlags</a>;
+#define             <a class="link" href="orc-MMX.html#ORC-MMX-SHUF:CAPS" title="ORC_MMX_SHUF()">ORC_MMX_SHUF</a>                        (a,
+                                                         b,
+                                                         c,
+                                                         d)
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-0f" title="orc_mmx_emit_0f ()">orc_mmx_emit_0f</a>                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-660f" title="orc_mmx_emit_660f ()">orc_mmx_emit_660f</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-f20f" title="orc_mmx_emit_f20f ()">orc_mmx_emit_f20f</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-f30f" title="orc_mmx_emit_f30f ()">orc_mmx_emit_f30f</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-loadib" title="orc_mmx_emit_loadib ()">orc_mmx_emit_loadib</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-loadil" title="orc_mmx_emit_loadil ()">orc_mmx_emit_loadil</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-loadiw" title="orc_mmx_emit_loadiw ()">orc_mmx_emit_loadiw</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-loadpb" title="orc_mmx_emit_loadpb ()">orc_mmx_emit_loadpb</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-loadpl" title="orc_mmx_emit_loadpl ()">orc_mmx_emit_loadpl</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-loadpq" title="orc_mmx_emit_loadpq ()">orc_mmx_emit_loadpq</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-loadpw" title="orc_mmx_emit_loadpw ()">orc_mmx_emit_loadpw</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-pshufw" title="orc_mmx_emit_pshufw ()">orc_mmx_emit_pshufw</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shuf</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-emit-shiftimm" title="orc_mmx_emit_shiftimm ()">orc_mmx_emit_shiftimm</a>               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> modrm_code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shift</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+unsigned <span class="returnvalue">int</span>        <a class="link" href="orc-MMX.html#orc-mmx-get-cpu-flags" title="orc_mmx_get_cpu_flags ()">orc_mmx_get_cpu_flags</a>               (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-MMX.html#orc-mmx-init" title="orc_mmx_init ()">orc_mmx_init</a>                        (<em class="parameter"><code><span class="type">void</span></code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-MMX.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-MMX.details"></a><h2>Details</h2>
+<div class="refsect2" title="enum OrcMMXRegister">
+<a name="OrcMMXRegister"></a><h3>enum OrcMMXRegister</h3>
+<pre class="programlisting">typedef enum {
+  X86_MM0 = ORC_VEC_REG_BASE,
+  X86_MM1,
+  X86_MM2,
+  X86_MM3,
+  X86_MM4,
+  X86_MM5,
+  X86_MM6,
+  X86_MM7
+} OrcMMXRegister;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum OrcTargetMMXFlags">
+<a name="OrcTargetMMXFlags"></a><h3>enum OrcTargetMMXFlags</h3>
+<pre class="programlisting">typedef enum {
+  ORC_TARGET_MMX_MMX = (1&lt;&lt;0),
+  ORC_TARGET_MMX_MMXEXT = (1&lt;&lt;1),
+  ORC_TARGET_MMX_3DNOW = (1&lt;&lt;2),
+  ORC_TARGET_MMX_3DNOWEXT = (1&lt;&lt;3),
+  ORC_TARGET_MMX_SSSE3 = (1&lt;&lt;4),
+  ORC_TARGET_MMX_SSE4_1 = (1&lt;&lt;5),
+  ORC_TARGET_MMX_SSE4_2 = (1&lt;&lt;6),
+  ORC_TARGET_MMX_FRAME_POINTER = (1&lt;&lt;7),
+  ORC_TARGET_MMX_SHORT_JUMPS = (1&lt;&lt;8),
+  ORC_TARGET_MMX_64BIT = (1&lt;&lt;9)
+} OrcTargetMMXFlags;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_MMX_SHUF()">
+<a name="ORC-MMX-SHUF:CAPS"></a><h3>ORC_MMX_SHUF()</h3>
+<pre class="programlisting">#define ORC_MMX_SHUF(a,b,c,d) ((((a)&amp;3)&lt;&lt;6)|(((b)&amp;3)&lt;&lt;4)|(((c)&amp;3)&lt;&lt;2)|(((d)&amp;3)&lt;&lt;0))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_0f ()">
+<a name="orc-mmx-emit-0f"></a><h3>orc_mmx_emit_0f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_0f                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_660f ()">
+<a name="orc-mmx-emit-660f"></a><h3>orc_mmx_emit_660f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_660f                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_f20f ()">
+<a name="orc-mmx-emit-f20f"></a><h3>orc_mmx_emit_f20f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_f20f                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_f30f ()">
+<a name="orc-mmx-emit-f30f"></a><h3>orc_mmx_emit_f30f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_f30f                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_loadib ()">
+<a name="orc-mmx-emit-loadib"></a><h3>orc_mmx_emit_loadib ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_loadib                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_loadil ()">
+<a name="orc-mmx-emit-loadil"></a><h3>orc_mmx_emit_loadil ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_loadil                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_loadiw ()">
+<a name="orc-mmx-emit-loadiw"></a><h3>orc_mmx_emit_loadiw ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_loadiw                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_loadpb ()">
+<a name="orc-mmx-emit-loadpb"></a><h3>orc_mmx_emit_loadpb ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_loadpb                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_loadpl ()">
+<a name="orc-mmx-emit-loadpl"></a><h3>orc_mmx_emit_loadpl ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_loadpl                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_loadpq ()">
+<a name="orc-mmx-emit-loadpq"></a><h3>orc_mmx_emit_loadpq ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_loadpq                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_loadpw ()">
+<a name="orc-mmx-emit-loadpw"></a><h3>orc_mmx_emit_loadpw ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_loadpw                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_pshufw ()">
+<a name="orc-mmx-emit-pshufw"></a><h3>orc_mmx_emit_pshufw ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_pshufw                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shuf</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>shuf</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_emit_shiftimm ()">
+<a name="orc-mmx-emit-shiftimm"></a><h3>orc_mmx_emit_shiftimm ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_emit_shiftimm               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> modrm_code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shift</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>modrm_code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>shift</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_get_cpu_flags ()">
+<a name="orc-mmx-get-cpu-flags"></a><h3>orc_mmx_get_cpu_flags ()</h3>
+<pre class="programlisting">unsigned <span class="returnvalue">int</span>        orc_mmx_get_cpu_flags               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_mmx_init ()">
+<a name="orc-mmx-init"></a><h3>orc_mmx_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_mmx_init                        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-Orc.html b/doc/html/orc-Orc.html
new file mode 100644 (file)
index 0000000..7863de2
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Orc</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch02.html" title="Application API">
+<link rel="prev" href="ch02.html" title="Application API">
+<link rel="next" href="orc-OrcProgram.html" title="OrcProgram">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-OrcProgram.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-Orc.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-Orc.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="Orc">
+<a name="orc-Orc"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-Orc.top_of_page"></a>Orc</span></h2>
+<p>Orc â€” Library Initialization</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-Orc.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis"><span class="returnvalue">void</span>                <a class="link" href="orc-Orc.html#orc-init" title="orc_init ()">orc_init</a>                            (<em class="parameter"><code><span class="type">void</span></code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-Orc.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-Orc.details"></a><h2>Details</h2>
+<div class="refsect2" title="orc_init ()">
+<a name="orc-init"></a><h3>orc_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_init                            (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+This function initializes the Orc library, and
+should be called before using any other Orc function.
+Subsequent calls to this function have no effect.
+</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-OrcCompiler.html b/doc/html/orc-OrcCompiler.html
new file mode 100644 (file)
index 0000000..4ed6645
--- /dev/null
@@ -0,0 +1,258 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>OrcCompiler</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch02.html" title="Application API">
+<link rel="prev" href="orc-OrcProgram.html" title="OrcProgram">
+<link rel="next" href="orc-OrcExecutor.html" title="OrcExecutor">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-OrcProgram.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-OrcExecutor.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-OrcCompiler.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-OrcCompiler.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="OrcCompiler">
+<a name="orc-OrcCompiler"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-OrcCompiler.top_of_page"></a>OrcCompiler</span></h2>
+<p>OrcCompiler â€” Compile Orc programs</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-OrcCompiler.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">enum                <a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult">OrcCompileResult</a>;
+                    <a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler">OrcCompiler</a>;
+                    <a class="link" href="orc-OrcCompiler.html#OrcConstant" title="OrcConstant">OrcConstant</a>;
+#define             <a class="link" href="orc-OrcCompiler.html#ORC-COMPILER-ERROR:CAPS" title="ORC_COMPILER_ERROR()">ORC_COMPILER_ERROR</a>                  (compiler,
+                                                         ...)
+#define             <a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS" title="ORC_COMPILE_RESULT_IS_FATAL()">ORC_COMPILE_RESULT_IS_FATAL</a>         (x)
+#define             <a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS" title="ORC_COMPILE_RESULT_IS_SUCCESSFUL()">ORC_COMPILE_RESULT_IS_SUCCESSFUL</a>    (x)
+#define             <a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()">ORC_ASM_CODE</a>                        (compiler,
+                                                         ...)
+#define             <a class="link" href="orc-OrcCompiler.html#ORC-ENABLE-ASM-CODE:CAPS" title="ORC_ENABLE_ASM_CODE">ORC_ENABLE_ASM_CODE</a>
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcCompiler.html#orc-compiler-append-code" title="orc_compiler_append_code ()">orc_compiler_append_code</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *fmt</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcCompiler.html#orc-compiler-label-new" title="orc_compiler_label_new ()">orc_compiler_label_new</a>              (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-OrcCompiler.description"></a><h2>Description</h2>
+<p>
+OrcCompiler is the object used to convert Orc programs contained
+in an OrcProgram object into assembly code and object code.
+</p>
+<p>
+The OrcCompileResult enum is used to indicate whether or not
+a compilation attempt was successful or not.  The macros
+<a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS" title="ORC_COMPILE_RESULT_IS_SUCCESSFUL()"><code class="function">ORC_COMPILE_RESULT_IS_SUCCESSFUL()</code></a> and <a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS" title="ORC_COMPILE_RESULT_IS_FATAL()"><code class="function">ORC_COMPILE_RESULT_IS_FATAL()</code></a>
+should be used instead of checking values directly.
+</p>
+<p>
+When a program is compiled, the compiler calls the functions
+contained in various OrcRule structures.  These functions generate
+assembly and object instructions by calling <a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()"><code class="function">ORC_ASM_CODE()</code></a>
+or functions that use <a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()"><code class="function">ORC_ASM_CODE()</code></a> internally.
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-OrcCompiler.details"></a><h2>Details</h2>
+<div class="refsect2" title="enum OrcCompileResult">
+<a name="OrcCompileResult"></a><h3>enum OrcCompileResult</h3>
+<pre class="programlisting">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;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcCompiler">
+<a name="OrcCompiler"></a><h3>OrcCompiler</h3>
+<pre class="programlisting">typedef struct {
+} OrcCompiler;
+</pre>
+<p>
+The OrcCompiler structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcConstant">
+<a name="OrcConstant"></a><h3>OrcConstant</h3>
+<pre class="programlisting">typedef struct {
+} OrcConstant;
+</pre>
+<p>
+The OrcConstant structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_COMPILER_ERROR()">
+<a name="ORC-COMPILER-ERROR:CAPS"></a><h3>ORC_COMPILER_ERROR()</h3>
+<pre class="programlisting">#define             ORC_COMPILER_ERROR(compiler, ...)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_COMPILE_RESULT_IS_FATAL()">
+<a name="ORC-COMPILE-RESULT-IS-FATAL:CAPS"></a><h3>ORC_COMPILE_RESULT_IS_FATAL()</h3>
+<pre class="programlisting">#define ORC_COMPILE_RESULT_IS_FATAL(x) ((x) &gt;= 0x200)
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_COMPILE_RESULT_IS_SUCCESSFUL()">
+<a name="ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS"></a><h3>ORC_COMPILE_RESULT_IS_SUCCESSFUL()</h3>
+<pre class="programlisting">#define ORC_COMPILE_RESULT_IS_SUCCESSFUL(x) ((x) &lt; 0x100)
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_ASM_CODE()">
+<a name="ORC-ASM-CODE:CAPS"></a><h3>ORC_ASM_CODE()</h3>
+<pre class="programlisting">#define             ORC_ASM_CODE(compiler,...)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_ENABLE_ASM_CODE">
+<a name="ORC-ENABLE-ASM-CODE:CAPS"></a><h3>ORC_ENABLE_ASM_CODE</h3>
+<pre class="programlisting">#define ORC_ENABLE_ASM_CODE
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_compiler_append_code ()">
+<a name="orc-compiler-append-code"></a><h3>orc_compiler_append_code ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_compiler_append_code            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *fmt</code></em>);</pre>
+<p>
+Generates a string using <code class="function">sprintf()</code> on the given format and
+arguments, and appends that string to the generated assembly
+code for the compiler.
+</p>
+<p>
+This function is used by the <a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()"><code class="function">ORC_ASM_CODE()</code></a> macro.
+</p>
+<p>
+This function is useful in a function implementing an OrcRule
+or implementing a target.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>an OrcCompiler object
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>fmt</code></em> :</span></p></td>
+<td>a printf-style format string
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_compiler_label_new ()">
+<a name="orc-compiler-label-new"></a><h3>orc_compiler_label_new ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_compiler_label_new              (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-OrcDebug.html b/doc/html/orc-OrcDebug.html
new file mode 100644 (file)
index 0000000..9b05ebb
--- /dev/null
@@ -0,0 +1,398 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>OrcDebug</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch03.html" title="Extension API">
+<link rel="prev" href="ch03.html" title="Extension API">
+<link rel="next" href="orc-OrcOpcode.html" title="OrcOpcode">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-OrcOpcode.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-OrcDebug.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-OrcDebug.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="OrcDebug">
+<a name="orc-OrcDebug"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-OrcDebug.top_of_page"></a>OrcDebug</span></h2>
+<p>OrcDebug â€” Printing and formatting debug information</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-OrcDebug.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">enum                <a class="link" href="orc-OrcDebug.html#OrcDebugLevel" title="enum OrcDebugLevel">OrcDebugLevel</a>;
+<span class="returnvalue">void</span>                (<a class="link" href="orc-OrcDebug.html#OrcDebugPrintFunc" title="OrcDebugPrintFunc ()">*OrcDebugPrintFunc</a>)                (<em class="parameter"><code><span class="type">int</span> level</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *func</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> line</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
+                                                         <em class="parameter"><code><span class="type">va_list</span> varargs</code></em>);
+#define             <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()">ORC_DEBUG_PRINT</a>                     (level,
+                                                         ...)
+#define             <a class="link" href="orc-OrcDebug.html#ORC-ERROR:CAPS" title="ORC_ERROR()">ORC_ERROR</a>                           (...)
+#define             <a class="link" href="orc-OrcDebug.html#ORC-WARNING:CAPS" title="ORC_WARNING()">ORC_WARNING</a>                         (...)
+#define             <a class="link" href="orc-OrcDebug.html#ORC-INFO:CAPS" title="ORC_INFO()">ORC_INFO</a>                            (...)
+#define             <a class="link" href="orc-OrcDebug.html#ORC-DEBUG:CAPS" title="ORC_DEBUG()">ORC_DEBUG</a>                           (...)
+#define             <a class="link" href="orc-OrcDebug.html#ORC-LOG:CAPS" title="ORC_LOG()">ORC_LOG</a>                             (...)
+#define             <a class="link" href="orc-OrcDebug.html#ORC-FUNCTION:CAPS" title="ORC_FUNCTION">ORC_FUNCTION</a>
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcDebug.html#orc-debug-get-level" title="orc_debug_get_level ()">orc_debug_get_level</a>                 (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcDebug.html#orc-debug-print" title="orc_debug_print ()">orc_debug_print</a>                     (<em class="parameter"><code><span class="type">int</span> level</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *func</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> line</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
+                                                         <em class="parameter"><code>...</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcDebug.html#orc-debug-set-level" title="orc_debug_set_level ()">orc_debug_set_level</a>                 (<em class="parameter"><code><span class="type">int</span> level</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcDebug.html#orc-debug-set-print-function" title="orc_debug_set_print_function ()">orc_debug_set_print_function</a>        (<em class="parameter"><code><a class="link" href="orc-OrcDebug.html#OrcDebugPrintFunc" title="OrcDebugPrintFunc ()"><span class="type">OrcDebugPrintFunc</span></a> func</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-OrcDebug.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-OrcDebug.details"></a><h2>Details</h2>
+<div class="refsect2" title="enum OrcDebugLevel">
+<a name="OrcDebugLevel"></a><h3>enum OrcDebugLevel</h3>
+<pre class="programlisting">typedef enum {
+  ORC_DEBUG_NONE = 0,
+  ORC_DEBUG_ERROR,
+  ORC_DEBUG_WARNING,
+  ORC_DEBUG_INFO,
+  ORC_DEBUG_DEBUG,
+  ORC_DEBUG_LOG
+} OrcDebugLevel;
+</pre>
+<p>
+Enumeration describing debug levels in Orc.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="ORC-DEBUG-NONE:CAPS"></a><span class="term"><code class="literal">ORC_DEBUG_NONE</code></span></p></td>
+<td>No debugging.  Used to disable debugging output.
+</td>
+</tr>
+<tr>
+<td><p><a name="ORC-DEBUG-ERROR:CAPS"></a><span class="term"><code class="literal">ORC_DEBUG_ERROR</code></span></p></td>
+<td>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.
+</td>
+</tr>
+<tr>
+<td><p><a name="ORC-DEBUG-WARNING:CAPS"></a><span class="term"><code class="literal">ORC_DEBUG_WARNING</code></span></p></td>
+<td>Messages at this level indicate something has
+  occurred that a developer looking into an application problem may
+  want to know.
+</td>
+</tr>
+<tr>
+<td><p><a name="ORC-DEBUG-INFO:CAPS"></a><span class="term"><code class="literal">ORC_DEBUG_INFO</code></span></p></td>
+<td>Messages at this level provide high-level
+  information about Orc internals.
+</td>
+</tr>
+<tr>
+<td><p><a name="ORC-DEBUG-DEBUG:CAPS"></a><span class="term"><code class="literal">ORC_DEBUG_DEBUG</code></span></p></td>
+<td>The default level for logging messages.
+</td>
+</tr>
+<tr>
+<td><p><a name="ORC-DEBUG-LOG:CAPS"></a><span class="term"><code class="literal">ORC_DEBUG_LOG</code></span></p></td>
+<td>The level for messages that probably don't need to
+  be logged at all.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="OrcDebugPrintFunc ()">
+<a name="OrcDebugPrintFunc"></a><h3>OrcDebugPrintFunc ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                (*OrcDebugPrintFunc)                (<em class="parameter"><code><span class="type">int</span> level</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *func</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> line</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
+                                                         <em class="parameter"><code><span class="type">va_list</span> varargs</code></em>);</pre>
+<p>
+Typedef describing functions that can be registered using
+<a class="link" href="orc-OrcDebug.html#orc-debug-set-print-function" title="orc_debug_set_print_function ()"><code class="function">orc_debug_set_print_function()</code></a> so that it is called to
+print debugging messages.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
+<td>the debug level
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
+<td>name of the file where the debug message occurs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
+<td>name of the function where the debug message occurs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
+<td>line in the file where the debug message occurs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
+<td>a printf format
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>varargs</code></em> :</span></p></td>
+<td>varargs for the printf format
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_DEBUG_PRINT()">
+<a name="ORC-DEBUG-PRINT:CAPS"></a><h3>ORC_DEBUG_PRINT()</h3>
+<pre class="programlisting">#define             ORC_DEBUG_PRINT(level, ...)</pre>
+<p>
+Macro to call <a class="link" href="orc-OrcDebug.html#orc-debug-print" title="orc_debug_print ()"><code class="function">orc_debug_print()</code></a> with the correct values for
+the name of the source file, line of source file, and function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
+<td>debug level of message
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>printf-style format and arguments
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_ERROR()">
+<a name="ORC-ERROR:CAPS"></a><h3>ORC_ERROR()</h3>
+<pre class="programlisting">#define ORC_ERROR(...) ORC_DEBUG_PRINT(ORC_DEBUG_ERROR, __VA_ARGS__)
+</pre>
+<p>
+Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-ERROR:CAPS"><span class="type">ORC_DEBUG_ERROR</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>printf-style format and arguments
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_WARNING()">
+<a name="ORC-WARNING:CAPS"></a><h3>ORC_WARNING()</h3>
+<pre class="programlisting">#define ORC_WARNING(...) ORC_DEBUG_PRINT(ORC_DEBUG_WARNING, __VA_ARGS__)
+</pre>
+<p>
+Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-WARNING:CAPS"><span class="type">ORC_DEBUG_WARNING</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>printf-style format and arguments
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_INFO()">
+<a name="ORC-INFO:CAPS"></a><h3>ORC_INFO()</h3>
+<pre class="programlisting">#define ORC_INFO(...) ORC_DEBUG_PRINT(ORC_DEBUG_INFO, __VA_ARGS__)
+</pre>
+<p>
+Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-INFO:CAPS"><span class="type">ORC_DEBUG_INFO</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>printf-style format and arguments
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_DEBUG()">
+<a name="ORC-DEBUG:CAPS"></a><h3>ORC_DEBUG()</h3>
+<pre class="programlisting">#define ORC_DEBUG(...) ORC_DEBUG_PRINT(ORC_DEBUG_DEBUG, __VA_ARGS__)
+</pre>
+<p>
+Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-DEBUG:CAPS"><span class="type">ORC_DEBUG_DEBUG</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>printf-style format and arguments
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_LOG()">
+<a name="ORC-LOG:CAPS"></a><h3>ORC_LOG()</h3>
+<pre class="programlisting">#define ORC_LOG(...) ORC_DEBUG_PRINT(ORC_DEBUG_LOG, __VA_ARGS__)
+</pre>
+<p>
+Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-LOG:CAPS"><span class="type">ORC_DEBUG_LOG</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>printf-style format and arguments
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_FUNCTION">
+<a name="ORC-FUNCTION:CAPS"></a><h3>ORC_FUNCTION</h3>
+<pre class="programlisting">#define             ORC_FUNCTION</pre>
+<p>
+Internal macro that points to __PRETTY_FUNCTION__ or __func__
+if the former is not available.
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_debug_get_level ()">
+<a name="orc-debug-get-level"></a><h3>orc_debug_get_level ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_debug_get_level                 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+Gets the current debug level.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the current debug level
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_debug_print ()">
+<a name="orc-debug-print"></a><h3>orc_debug_print ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_debug_print                     (<em class="parameter"><code><span class="type">int</span> level</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *func</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> line</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
+                                                         <em class="parameter"><code>...</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_debug_set_level ()">
+<a name="orc-debug-set-level"></a><h3>orc_debug_set_level ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_debug_set_level                 (<em class="parameter"><code><span class="type">int</span> level</code></em>);</pre>
+<p>
+Sets the current debug level.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
+<td>the new debug level
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_debug_set_print_function ()">
+<a name="orc-debug-set-print-function"></a><h3>orc_debug_set_print_function ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_debug_set_print_function        (<em class="parameter"><code><a class="link" href="orc-OrcDebug.html#OrcDebugPrintFunc" title="OrcDebugPrintFunc ()"><span class="type">OrcDebugPrintFunc</span></a> func</code></em>);</pre>
+<p>
+Sets the function to call when outputting debugging information.
+A value of NULL for <em class="parameter"><code>func</code></em> will restore the default handler,
+which prints debugging information to stderr.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
+<td>the function to call
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-OrcExecutor.html b/doc/html/orc-OrcExecutor.html
new file mode 100644 (file)
index 0000000..84fe854
--- /dev/null
@@ -0,0 +1,369 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>OrcExecutor</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch02.html" title="Application API">
+<link rel="prev" href="orc-OrcCompiler.html" title="OrcCompiler">
+<link rel="next" href="orc-opcodes.html" title="Orc Opcodes">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-OrcCompiler.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-opcodes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-OrcExecutor.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-OrcExecutor.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="OrcExecutor">
+<a name="orc-OrcExecutor"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-OrcExecutor.top_of_page"></a>OrcExecutor</span></h2>
+<p>OrcExecutor â€” Running Orc programs</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-OrcExecutor.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">                    <a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor">OrcExecutor</a>;
+<a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="returnvalue">OrcExecutor</span></a> *       <a class="link" href="orc-OrcExecutor.html#orc-executor-new" title="orc_executor_new ()">orc_executor_new</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-free" title="orc_executor_free ()">orc_executor_free</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-set-array" title="orc_executor_set_array ()">orc_executor_set_array</a>              (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> var</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-set-array-str" title="orc_executor_set_array_str ()">orc_executor_set_array_str</a>          (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-set-n" title="orc_executor_set_n ()">orc_executor_set_n</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> n</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-emulate" title="orc_executor_emulate ()">orc_executor_emulate</a>                (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-run" title="orc_executor_run ()">orc_executor_run</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcExecutor.html#orc-executor-get-accumulator" title="orc_executor_get_accumulator ()">orc_executor_get_accumulator</a>        (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> var</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcExecutor.html#orc-executor-get-accumulator-str" title="orc_executor_get_accumulator_str ()">orc_executor_get_accumulator_str</a>    (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-set-param" title="orc_executor_set_param ()">orc_executor_set_param</a>              (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> var</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-set-param-str" title="orc_executor_set_param_str ()">orc_executor_set_param_str</a>          (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcExecutor.html#orc-executor-set-program" title="orc_executor_set_program ()">orc_executor_set_program</a>            (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-OrcExecutor.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-OrcExecutor.details"></a><h2>Details</h2>
+<div class="refsect2" title="OrcExecutor">
+<a name="OrcExecutor"></a><h3>OrcExecutor</h3>
+<pre class="programlisting">typedef struct {
+} OrcExecutor;
+</pre>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_new ()">
+<a name="orc-executor-new"></a><h3>orc_executor_new ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="returnvalue">OrcExecutor</span></a> *       orc_executor_new                    (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_free ()">
+<a name="orc-executor-free"></a><h3>orc_executor_free ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_free                   (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_set_array ()">
+<a name="orc-executor-set-array"></a><h3>orc_executor_set_array ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_set_array              (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> var</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>var</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_set_array_str ()">
+<a name="orc-executor-set-array-str"></a><h3>orc_executor_set_array_str ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_set_array_str          (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_set_n ()">
+<a name="orc-executor-set-n"></a><h3>orc_executor_set_n ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_set_n                  (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> n</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_emulate ()">
+<a name="orc-executor-emulate"></a><h3>orc_executor_emulate ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_emulate                (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_run ()">
+<a name="orc-executor-run"></a><h3>orc_executor_run ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_run                    (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_get_accumulator ()">
+<a name="orc-executor-get-accumulator"></a><h3>orc_executor_get_accumulator ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_executor_get_accumulator        (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> var</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>var</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_get_accumulator_str ()">
+<a name="orc-executor-get-accumulator-str"></a><h3>orc_executor_get_accumulator_str ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_executor_get_accumulator_str    (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_set_param ()">
+<a name="orc-executor-set-param"></a><h3>orc_executor_set_param ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_set_param              (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> var</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>var</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_set_param_str ()">
+<a name="orc-executor-set-param-str"></a><h3>orc_executor_set_param_str ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_set_param_str          (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_executor_set_program ()">
+<a name="orc-executor-set-program"></a><h3>orc_executor_set_program ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_executor_set_program            (<em class="parameter"><code><a class="link" href="orc-OrcExecutor.html#OrcExecutor" title="OrcExecutor"><span class="type">OrcExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-OrcOpcode.html b/doc/html/orc-OrcOpcode.html
new file mode 100644 (file)
index 0000000..11038b3
--- /dev/null
@@ -0,0 +1,500 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>OrcOpcode</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch03.html" title="Extension API">
+<link rel="prev" href="orc-OrcDebug.html" title="OrcDebug">
+<link rel="next" href="orc-Utility-functions.html" title="Utility functions">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-OrcDebug.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-Utility-functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-OrcOpcode.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-OrcOpcode.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="OrcOpcode">
+<a name="orc-OrcOpcode"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-OrcOpcode.top_of_page"></a>OrcOpcode</span></h2>
+<p>OrcOpcode â€” Operations</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-OrcOpcode.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis"><span class="returnvalue">void</span>                (<a class="link" href="orc-OrcOpcode.html#OrcOpcodeEmulateFunc" title="OrcOpcodeEmulateFunc ()">*OrcOpcodeEmulateFunc</a>)             (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcOpcodeExecutor" title="OrcOpcodeExecutor"><span class="type">OrcOpcodeExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *user</code></em>);
+                    <a class="link" href="orc-OrcOpcode.html#OrcOpcodeExecutor" title="OrcOpcodeExecutor">OrcOpcodeExecutor</a>;
+                    <a class="link" href="orc-OrcOpcode.html#OrcOpcodeSet" title="OrcOpcodeSet">OrcOpcodeSet</a>;
+                    <a class="link" href="orc-OrcOpcode.html#OrcRuleSet" title="OrcRuleSet">OrcRuleSet</a>;
+                    <a class="link" href="orc-OrcOpcode.html#OrcStaticOpcode" title="OrcStaticOpcode">OrcStaticOpcode</a>;
+                    <a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget">OrcTarget</a>;
+#define             <a class="link" href="orc-OrcOpcode.html#ORC-OPCODE-N-ARGS:CAPS" title="ORC_OPCODE_N_ARGS">ORC_OPCODE_N_ARGS</a>
+#define             <a class="link" href="orc-OrcOpcode.html#ORC-STATIC-OPCODE-ACCUMULATOR:CAPS" title="ORC_STATIC_OPCODE_ACCUMULATOR">ORC_STATIC_OPCODE_ACCUMULATOR</a>
+#define             <a class="link" href="orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-DEST:CAPS" title="ORC_STATIC_OPCODE_N_DEST">ORC_STATIC_OPCODE_N_DEST</a>
+#define             <a class="link" href="orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-SRC:CAPS" title="ORC_STATIC_OPCODE_N_SRC">ORC_STATIC_OPCODE_N_SRC</a>
+<a class="link" href="orc-OrcOpcode.html#OrcStaticOpcode" title="OrcStaticOpcode"><span class="returnvalue">OrcStaticOpcode</span></a> *   <a class="link" href="orc-OrcOpcode.html#orc-opcode-find-by-name" title="orc_opcode_find_by_name ()">orc_opcode_find_by_name</a>             (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcOpcode.html#orc-opcode-init" title="orc_opcode_init ()">orc_opcode_init</a>                     (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcOpcode.html#orc-opcode-register-static" title="orc_opcode_register_static ()">orc_opcode_register_static</a>          (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcStaticOpcode" title="OrcStaticOpcode"><span class="type">OrcStaticOpcode</span></a> *sopcode</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> *prefix</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcOpcode.html#orc-opcode-set-find-by-name" title="orc_opcode_set_find_by_name ()">orc_opcode_set_find_by_name</a>         (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcOpcodeSet" title="OrcOpcodeSet"><span class="type">OrcOpcodeSet</span></a> *opcode_set</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<a class="link" href="orc-OrcOpcode.html#OrcOpcodeSet" title="OrcOpcodeSet"><span class="returnvalue">OrcOpcodeSet</span></a> *      <a class="link" href="orc-OrcOpcode.html#orc-opcode-set-get" title="orc_opcode_set_get ()">orc_opcode_set_get</a>                  (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<a class="link" href="orc-OrcOpcode.html#OrcRuleSet" title="OrcRuleSet"><span class="returnvalue">OrcRuleSet</span></a> *        <a class="link" href="orc-OrcOpcode.html#orc-rule-set-new" title="orc_rule_set_new ()">orc_rule_set_new</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcOpcodeSet" title="OrcOpcodeSet"><span class="type">OrcOpcodeSet</span></a> *opcode_set</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> required_flags</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-OrcOpcode.html#orc-target-get-asm-preamble" title="orc_target_get_asm_preamble ()">orc_target_get_asm_preamble</a>         (<em class="parameter"><code>const <span class="type">char</span> *target</code></em>);
+<a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="returnvalue">OrcTarget</span></a> *         <a class="link" href="orc-OrcOpcode.html#orc-target-get-by-name" title="orc_target_get_by_name ()">orc_target_get_by_name</a>              (<em class="parameter"><code>const <span class="type">char</span> *target_name</code></em>);
+<a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="returnvalue">OrcTarget</span></a> *         <a class="link" href="orc-OrcOpcode.html#orc-target-get-default" title="orc_target_get_default ()">orc_target_get_default</a>              (<em class="parameter"><code><span class="type">void</span></code></em>);
+unsigned <span class="returnvalue">int</span>        <a class="link" href="orc-OrcOpcode.html#orc-target-get-default-flags" title="orc_target_get_default_flags ()">orc_target_get_default_flags</a>        (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-OrcOpcode.html#orc-target-get-name" title="orc_target_get_name ()">orc_target_get_name</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);
+<a class="link" href="orc-misc.html#OrcRule" title="OrcRule"><span class="returnvalue">OrcRule</span></a> *           <a class="link" href="orc-OrcOpcode.html#orc-target-get-rule" title="orc_target_get_rule ()">orc_target_get_rule</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcStaticOpcode" title="OrcStaticOpcode"><span class="type">OrcStaticOpcode</span></a> *opcode</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> target_flags</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcOpcode.html#orc-target-register" title="orc_target_register ()">orc_target_register</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-OrcOpcode.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-OrcOpcode.details"></a><h2>Details</h2>
+<div class="refsect2" title="OrcOpcodeEmulateFunc ()">
+<a name="OrcOpcodeEmulateFunc"></a><h3>OrcOpcodeEmulateFunc ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                (*OrcOpcodeEmulateFunc)             (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcOpcodeExecutor" title="OrcOpcodeExecutor"><span class="type">OrcOpcodeExecutor</span></a> *ex</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *user</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="OrcOpcodeExecutor">
+<a name="OrcOpcodeExecutor"></a><h3>OrcOpcodeExecutor</h3>
+<pre class="programlisting">typedef struct {
+} OrcOpcodeExecutor;
+</pre>
+<p>
+The OrcOpcodeExecutor structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcOpcodeSet">
+<a name="OrcOpcodeSet"></a><h3>OrcOpcodeSet</h3>
+<pre class="programlisting">typedef struct {
+} OrcOpcodeSet;
+</pre>
+<p>
+The OrcOpcodeSet structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcRuleSet">
+<a name="OrcRuleSet"></a><h3>OrcRuleSet</h3>
+<pre class="programlisting">typedef struct {
+} OrcRuleSet;
+</pre>
+<p>
+The OrcRuleSet structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcStaticOpcode">
+<a name="OrcStaticOpcode"></a><h3>OrcStaticOpcode</h3>
+<pre class="programlisting">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;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcTarget">
+<a name="OrcTarget"></a><h3>OrcTarget</h3>
+<pre class="programlisting">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;
+</pre>
+</div>
+<hr>
+<div class="refsect2" title="ORC_OPCODE_N_ARGS">
+<a name="ORC-OPCODE-N-ARGS:CAPS"></a><h3>ORC_OPCODE_N_ARGS</h3>
+<pre class="programlisting">#define ORC_OPCODE_N_ARGS 4
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_STATIC_OPCODE_ACCUMULATOR">
+<a name="ORC-STATIC-OPCODE-ACCUMULATOR:CAPS"></a><h3>ORC_STATIC_OPCODE_ACCUMULATOR</h3>
+<pre class="programlisting">#define ORC_STATIC_OPCODE_ACCUMULATOR (1&lt;&lt;0)
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_STATIC_OPCODE_N_DEST">
+<a name="ORC-STATIC-OPCODE-N-DEST:CAPS"></a><h3>ORC_STATIC_OPCODE_N_DEST</h3>
+<pre class="programlisting">#define ORC_STATIC_OPCODE_N_DEST 2
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_STATIC_OPCODE_N_SRC">
+<a name="ORC-STATIC-OPCODE-N-SRC:CAPS"></a><h3>ORC_STATIC_OPCODE_N_SRC</h3>
+<pre class="programlisting">#define ORC_STATIC_OPCODE_N_SRC 4
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_opcode_find_by_name ()">
+<a name="orc-opcode-find-by-name"></a><h3>orc_opcode_find_by_name ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcOpcode.html#OrcStaticOpcode" title="OrcStaticOpcode"><span class="returnvalue">OrcStaticOpcode</span></a> *   orc_opcode_find_by_name             (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_opcode_init ()">
+<a name="orc-opcode-init"></a><h3>orc_opcode_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_opcode_init                     (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_opcode_register_static ()">
+<a name="orc-opcode-register-static"></a><h3>orc_opcode_register_static ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_opcode_register_static          (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcStaticOpcode" title="OrcStaticOpcode"><span class="type">OrcStaticOpcode</span></a> *sopcode</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> *prefix</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>sopcode</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_opcode_set_find_by_name ()">
+<a name="orc-opcode-set-find-by-name"></a><h3>orc_opcode_set_find_by_name ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_opcode_set_find_by_name         (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcOpcodeSet" title="OrcOpcodeSet"><span class="type">OrcOpcodeSet</span></a> *opcode_set</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode_set</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_opcode_set_get ()">
+<a name="orc-opcode-set-get"></a><h3>orc_opcode_set_get ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcOpcode.html#OrcOpcodeSet" title="OrcOpcodeSet"><span class="returnvalue">OrcOpcodeSet</span></a> *      orc_opcode_set_get                  (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_rule_set_new ()">
+<a name="orc-rule-set-new"></a><h3>orc_rule_set_new ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcOpcode.html#OrcRuleSet" title="OrcRuleSet"><span class="returnvalue">OrcRuleSet</span></a> *        orc_rule_set_new                    (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcOpcodeSet" title="OrcOpcodeSet"><span class="type">OrcOpcodeSet</span></a> *opcode_set</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> required_flags</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode_set</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>required_flags</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_target_get_asm_preamble ()">
+<a name="orc-target-get-asm-preamble"></a><h3>orc_target_get_asm_preamble ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_target_get_asm_preamble         (<em class="parameter"><code>const <span class="type">char</span> *target</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_target_get_by_name ()">
+<a name="orc-target-get-by-name"></a><h3>orc_target_get_by_name ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="returnvalue">OrcTarget</span></a> *         orc_target_get_by_name              (<em class="parameter"><code>const <span class="type">char</span> *target_name</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_target_get_default ()">
+<a name="orc-target-get-default"></a><h3>orc_target_get_default ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="returnvalue">OrcTarget</span></a> *         orc_target_get_default              (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_target_get_default_flags ()">
+<a name="orc-target-get-default-flags"></a><h3>orc_target_get_default_flags ()</h3>
+<pre class="programlisting">unsigned <span class="returnvalue">int</span>        orc_target_get_default_flags        (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_target_get_name ()">
+<a name="orc-target-get-name"></a><h3>orc_target_get_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_target_get_name                 (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_target_get_rule ()">
+<a name="orc-target-get-rule"></a><h3>orc_target_get_rule ()</h3>
+<pre class="programlisting"><a class="link" href="orc-misc.html#OrcRule" title="OrcRule"><span class="returnvalue">OrcRule</span></a> *           orc_target_get_rule                 (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcStaticOpcode" title="OrcStaticOpcode"><span class="type">OrcStaticOpcode</span></a> *opcode</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> target_flags</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target_flags</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_target_register ()">
+<a name="orc-target-register"></a><h3>orc_target_register ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_target_register                 (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-OrcProgram.html b/doc/html/orc-OrcProgram.html
new file mode 100644 (file)
index 0000000..a00cb3d
--- /dev/null
@@ -0,0 +1,987 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>OrcProgram</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch02.html" title="Application API">
+<link rel="prev" href="orc-Orc.html" title="Orc">
+<link rel="next" href="orc-OrcCompiler.html" title="OrcCompiler">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-Orc.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-OrcCompiler.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-OrcProgram.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-OrcProgram.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="OrcProgram">
+<a name="orc-OrcProgram"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-OrcProgram.top_of_page"></a>OrcProgram</span></h2>
+<p>OrcProgram â€” Creating and manipulating Orc programs</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-OrcProgram.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">                    <a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram">OrcProgram</a>;
+#define             <a class="link" href="orc-OrcProgram.html#ORC-N-CONSTANTS:CAPS" title="ORC_N_CONSTANTS">ORC_N_CONSTANTS</a>
+#define             <a class="link" href="orc-OrcProgram.html#ORC-N-RULE-SETS:CAPS" title="ORC_N_RULE_SETS">ORC_N_RULE_SETS</a>
+#define             <a class="link" href="orc-OrcProgram.html#ORC-N-TARGETS:CAPS" title="ORC_N_TARGETS">ORC_N_TARGETS</a>
+#define             <a class="link" href="orc-OrcProgram.html#ORC-PROGRAM-ERROR:CAPS" title="ORC_PROGRAM_ERROR()">ORC_PROGRAM_ERROR</a>                   (program,
+                                                         ...)
+<a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        <a class="link" href="orc-OrcProgram.html#orc-program-new" title="orc_program_new ()">orc_program_new</a>                     (<em class="parameter"><code><span class="type">void</span></code></em>);
+<a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        <a class="link" href="orc-OrcProgram.html#orc-program-new-dss" title="orc_program_new_dss ()">orc_program_new_dss</a>                 (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size3</code></em>);
+<a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        <a class="link" href="orc-OrcProgram.html#orc-program-new-as" title="orc_program_new_as ()">orc_program_new_as</a>                  (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>);
+<a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        <a class="link" href="orc-OrcProgram.html#orc-program-new-ass" title="orc_program_new_ass ()">orc_program_new_ass</a>                 (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size3</code></em>);
+<a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        <a class="link" href="orc-OrcProgram.html#orc-program-new-ds" title="orc_program_new_ds ()">orc_program_new_ds</a>                  (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcProgram.html#orc-program-free" title="orc_program_free ()">orc_program_free</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-OrcProgram.html#orc-program-get-name" title="orc_program_get_name ()">orc_program_get_name</a>                (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcProgram.html#orc-program-set-name" title="orc_program_set_name ()">orc_program_set_name</a>                (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-add-temporary" title="orc_program_add_temporary ()">orc_program_add_temporary</a>           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-add-source" title="orc_program_add_source ()">orc_program_add_source</a>              (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-add-destination" title="orc_program_add_destination ()">orc_program_add_destination</a>         (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-add-constant" title="orc_program_add_constant ()">orc_program_add_constant</a>            (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-add-accumulator" title="orc_program_add_accumulator ()">orc_program_add_accumulator</a>         (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-add-parameter" title="orc_program_add_parameter ()">orc_program_add_parameter</a>           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcProgram.html#orc-program-append" title="orc_program_append ()">orc_program_append</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg0</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcProgram.html#orc-program-append-str" title="orc_program_append_str ()">orc_program_append_str</a>              (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg0</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg1</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcProgram.html#orc-program-append-ds" title="orc_program_append_ds ()">orc_program_append_ds</a>               (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg0</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg1</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-OrcProgram.html#orc-program-append-ds-str" title="orc_program_append_ds_str ()">orc_program_append_ds_str</a>           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg0</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg1</code></em>);
+<a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult"><span class="returnvalue">OrcCompileResult</span></a>    <a class="link" href="orc-OrcProgram.html#orc-program-compile" title="orc_program_compile ()">orc_program_compile</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>);
+<a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult"><span class="returnvalue">OrcCompileResult</span></a>    <a class="link" href="orc-OrcProgram.html#orc-program-compile-for-target" title="orc_program_compile_for_target ()">orc_program_compile_for_target</a>      (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);
+<a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult"><span class="returnvalue">OrcCompileResult</span></a>    <a class="link" href="orc-OrcProgram.html#orc-program-compile-full" title="orc_program_compile_full ()">orc_program_compile_full</a>            (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-OrcProgram.html#orc-program-get-asm-code" title="orc_program_get_asm_code ()">orc_program_get_asm_code</a>            (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);
+
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-find-var-by-name" title="orc_program_find_var_by_name ()">orc_program_find_var_by_name</a>        (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-allocate-register" title="orc_program_allocate_register ()">orc_program_allocate_register</a>       (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> is_data</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-OrcProgram.html#orc-program-dup-temporary" title="orc_program_dup_temporary ()">orc_program_dup_temporary</a>           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> i</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> j</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-OrcProgram.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-OrcProgram.details"></a><h2>Details</h2>
+<div class="refsect2" title="OrcProgram">
+<a name="OrcProgram"></a><h3>OrcProgram</h3>
+<pre class="programlisting">typedef struct {
+} OrcProgram;
+</pre>
+<p>
+The OrcProgram structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_CONSTANTS">
+<a name="ORC-N-CONSTANTS:CAPS"></a><h3>ORC_N_CONSTANTS</h3>
+<pre class="programlisting">#define ORC_N_CONSTANTS 20
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_RULE_SETS">
+<a name="ORC-N-RULE-SETS:CAPS"></a><h3>ORC_N_RULE_SETS</h3>
+<pre class="programlisting">#define ORC_N_RULE_SETS 10
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_TARGETS">
+<a name="ORC-N-TARGETS:CAPS"></a><h3>ORC_N_TARGETS</h3>
+<pre class="programlisting">#define ORC_N_TARGETS 10
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_PROGRAM_ERROR()">
+<a name="ORC-PROGRAM-ERROR:CAPS"></a><h3>ORC_PROGRAM_ERROR()</h3>
+<pre class="programlisting">#define             ORC_PROGRAM_ERROR(program, ...)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_new ()">
+<a name="orc-program-new"></a><h3>orc_program_new ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        orc_program_new                     (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+Create a new OrcProgram.  The program should be freed using
+@<a class="link" href="orc-OrcProgram.html#orc-program-free" title="orc_program_free ()"><code class="function">orc_program_free()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a pointer to an OrcProgram structure
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_new_dss ()">
+<a name="orc-program-new-dss"></a><h3>orc_program_new_dss ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        orc_program_new_dss                 (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size3</code></em>);</pre>
+<p>
+Create a new OrcProgram, with a destination named "d1" and
+two sources named "s1" and "s2".
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size1</code></em> :</span></p></td>
+<td>size of destination array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size2</code></em> :</span></p></td>
+<td>size of first source array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size3</code></em> :</span></p></td>
+<td>size of second source array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a pointer to an OrcProgram structure
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_new_as ()">
+<a name="orc-program-new-as"></a><h3>orc_program_new_as ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        orc_program_new_as                  (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>);</pre>
+<p>
+Create a new OrcProgram, with an accumulator named "a1" and
+one source named "s1".
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size1</code></em> :</span></p></td>
+<td>size of destination array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size2</code></em> :</span></p></td>
+<td>size of source array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a pointer to an OrcProgram structure
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_new_ass ()">
+<a name="orc-program-new-ass"></a><h3>orc_program_new_ass ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        orc_program_new_ass                 (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size3</code></em>);</pre>
+<p>
+Create a new OrcProgram, with an accumulator named "a1" and
+two source named "s1" and "s2".
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size1</code></em> :</span></p></td>
+<td>size of destination array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size2</code></em> :</span></p></td>
+<td>size of first source array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size3</code></em> :</span></p></td>
+<td>size of second source array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a pointer to an OrcProgram structure
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_new_ds ()">
+<a name="orc-program-new-ds"></a><h3>orc_program_new_ds ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="returnvalue">OrcProgram</span></a> *        orc_program_new_ds                  (<em class="parameter"><code><span class="type">int</span> size1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size2</code></em>);</pre>
+<p>
+Create a new OrcProgram, with a destination named "d1" and
+one source named "s1".
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size1</code></em> :</span></p></td>
+<td>size of destination array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size2</code></em> :</span></p></td>
+<td>size of source array members
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a pointer to an OrcProgram structure
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_free ()">
+<a name="orc-program-free"></a><h3>orc_program_free ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_program_free                    (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);</pre>
+<p>
+Frees an OrcProgram.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_get_name ()">
+<a name="orc-program-get-name"></a><h3>orc_program_get_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_program_get_name                (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);</pre>
+<p>
+Gets the name of the program.  The string is valid until the name
+is changed or the program is freed.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a character string
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_set_name ()">
+<a name="orc-program-set-name"></a><h3>orc_program_set_name ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_program_set_name                (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Sets the name of the program.  The string is copied.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>string to set the name to
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_add_temporary ()">
+<a name="orc-program-add-temporary"></a><h3>orc_program_add_temporary ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_add_temporary           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Creates a new variable holding temporary values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>size of data values
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the new variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_add_source ()">
+<a name="orc-program-add-source"></a><h3>orc_program_add_source ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_add_source              (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Creates a new variable representing a source array.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>size of data values
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the new variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_add_destination ()">
+<a name="orc-program-add-destination"></a><h3>orc_program_add_destination ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_add_destination         (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Creates a new variable representing a destination array.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>size of data values
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the new variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_add_constant ()">
+<a name="orc-program-add-constant"></a><h3>orc_program_add_constant ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_add_constant            (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Creates a new variable representing a constant value.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>size of data value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>the value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the new variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_add_accumulator ()">
+<a name="orc-program-add-accumulator"></a><h3>orc_program_add_accumulator ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_add_accumulator         (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Creates a new variable representing an accumulator.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>size of data value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the new variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_add_parameter ()">
+<a name="orc-program-add-parameter"></a><h3>orc_program_add_parameter ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_add_parameter           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Creates a new variable representing a scalar parameter.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>size of data value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the new variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_append ()">
+<a name="orc-program-append"></a><h3>orc_program_append ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_program_append                  (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg0</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg0</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_append_str ()">
+<a name="orc-program-append-str"></a><h3>orc_program_append_str ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_program_append_str              (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg0</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg1</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg2</code></em>);</pre>
+<p>
+Appends an instruction to the program, with arguments <em class="parameter"><code>arg0</code></em>,
+<em class="parameter"><code>arg1</code></em>, and <em class="parameter"><code>arg2</code></em>.  The instruction must take 3 operands.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg0</code></em> :</span></p></td>
+<td>name of first variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
+<td>name of second variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg2</code></em> :</span></p></td>
+<td>name of third variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_append_ds ()">
+<a name="orc-program-append-ds"></a><h3>orc_program_append_ds ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_program_append_ds               (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg0</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> arg1</code></em>);</pre>
+<p>
+Appends an instruction to the program, with arguments <em class="parameter"><code>arg0</code></em>,
+<em class="parameter"><code>arg1</code></em>, and <em class="parameter"><code>arg2</code></em>.  The instruction must take 3 operands.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg0</code></em> :</span></p></td>
+<td>index of first variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
+<td>index of second variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_append_ds_str ()">
+<a name="orc-program-append-ds-str"></a><h3>orc_program_append_ds_str ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_program_append_ds_str           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg0</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *arg1</code></em>);</pre>
+<p>
+Appends an instruction to the program, with arguments <em class="parameter"><code>arg0</code></em> and
+<em class="parameter"><code>arg2</code></em>.  The instruction must take 2 operands.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg0</code></em> :</span></p></td>
+<td>name of first variable
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
+<td>name of second variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_compile ()">
+<a name="orc-program-compile"></a><h3>orc_program_compile ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult"><span class="returnvalue">OrcCompileResult</span></a>    orc_program_compile                 (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>);</pre>
+<p>
+Compiles an Orc program for the current CPU.  If successful,
+executable code for the program was generated and can be
+executed.
+</p>
+<p>
+The return value indicates various levels of success or failure.
+Success can be determined by checking for a true value of the
+macro <a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS" title="ORC_COMPILE_RESULT_IS_SUCCESSFUL()"><code class="function">ORC_COMPILE_RESULT_IS_SUCCESSFUL()</code></a> on the return value.  This
+indicates that executable code was generated.  If the macro
+<a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS" title="ORC_COMPILE_RESULT_IS_FATAL()"><code class="function">ORC_COMPILE_RESULT_IS_FATAL()</code></a> 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>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> an OrcCompileResult
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_compile_for_target ()">
+<a name="orc-program-compile-for-target"></a><h3>orc_program_compile_for_target ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult"><span class="returnvalue">OrcCompileResult</span></a>    orc_program_compile_for_target      (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>);</pre>
+<p>
+Compiles an Orc program for the given target, using the
+default target flags for that target.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> an OrcCompileResult
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_compile_full ()">
+<a name="orc-program-compile-full"></a><h3>orc_program_compile_full ()</h3>
+<pre class="programlisting"><a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult"><span class="returnvalue">OrcCompileResult</span></a>    orc_program_compile_full            (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcTarget" title="OrcTarget"><span class="type">OrcTarget</span></a> *target</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
+<p>
+Compiles an Orc program for the given target, using the
+given target flags.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> an OrcCompileResult
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_get_asm_code ()">
+<a name="orc-program-get-asm-code"></a><h3>orc_program_get_asm_code ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_program_get_asm_code            (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>);</pre>
+<p>
+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.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a character string
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_find_var_by_name ()">
+<a name="orc-program-find-var-by-name"></a><h3>orc_program_find_var_by_name ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_find_var_by_name        (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
+<p>
+Finds the variable with the name <em class="parameter"><code>name</code></em>.  If no variable with the
+given name exists in the program, -1 is returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of instruction
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_allocate_register ()">
+<a name="orc-program-allocate-register"></a><h3>orc_program_allocate_register ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_allocate_register       (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> is_data</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>is_data</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_program_dup_temporary ()">
+<a name="orc-program-dup-temporary"></a><h3>orc_program_dup_temporary ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_program_dup_temporary           (<em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> *program</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> i</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> j</code></em>);</pre>
+<p>
+Internal function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
+<td>a pointer to an OrcProgram structure
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>j</code></em> :</span></p></td>
+<td>index
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the index of the new variable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-OrcRule.html b/doc/html/orc-OrcRule.html
new file mode 100644 (file)
index 0000000..68668da
--- /dev/null
@@ -0,0 +1,91 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>OrcRule</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch03.html" title="Extension API">
+<link rel="prev" href="orc-Utility-functions.html" title="Utility functions">
+<link rel="next" href="ch04.html" title="Code Generation">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-Utility-functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="ch04.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-OrcRule.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-OrcRule.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="OrcRule">
+<a name="orc-OrcRule"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-OrcRule.top_of_page"></a>OrcRule</span></h2>
+<p>OrcRule â€” Creating rules for code generation</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-OrcRule.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis"><span class="returnvalue">void</span>                <a class="link" href="orc-OrcRule.html#orc-rule-register" title="orc_rule_register ()">orc_rule_register</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcRuleSet" title="OrcRuleSet"><span class="type">OrcRuleSet</span></a> *rule_set</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode_name</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-misc.html#OrcRuleEmitFunc" title="OrcRuleEmitFunc ()"><span class="type">OrcRuleEmitFunc</span></a> emit</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *emit_user</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-OrcRule.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-OrcRule.details"></a><h2>Details</h2>
+<div class="refsect2" title="orc_rule_register ()">
+<a name="orc-rule-register"></a><h3>orc_rule_register ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_rule_register                   (<em class="parameter"><code><a class="link" href="orc-OrcOpcode.html#OrcRuleSet" title="OrcRuleSet"><span class="type">OrcRuleSet</span></a> *rule_set</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *opcode_name</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-misc.html#OrcRuleEmitFunc" title="OrcRuleEmitFunc ()"><span class="type">OrcRuleEmitFunc</span></a> emit</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *emit_user</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rule_set</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>opcode_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>emit</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>emit_user</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-PowerPC.html b/doc/html/orc-PowerPC.html
new file mode 100644 (file)
index 0000000..a9f69af
--- /dev/null
@@ -0,0 +1,752 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PowerPC</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch04.html" title="Code Generation">
+<link rel="prev" href="orc-MMX.html" title="MMX">
+<link rel="next" href="orc-SSE.html" title="SSE">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-MMX.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-SSE.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-PowerPC.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-PowerPC.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="PowerPC">
+<a name="orc-PowerPC"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-PowerPC.top_of_page"></a>PowerPC</span></h2>
+<p>PowerPC â€” code generation for PowerPC</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-PowerPC.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">const <span class="returnvalue">char</span> *        <a class="link" href="orc-PowerPC.html#powerpc-get-regname" title="powerpc_get_regname ()">powerpc_get_regname</a>                 (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-PowerPC.html#powerpc-regnum" title="powerpc_regnum ()">powerpc_regnum</a>                      (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-add-fixup" title="powerpc_add_fixup ()">powerpc_add_fixup</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> type</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *ptr</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-do-fixups" title="powerpc_do_fixups ()">powerpc_do_fixups</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit" title="powerpc_emit ()">powerpc_emit</a>                        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-655510" title="powerpc_emit_655510 ()">powerpc_emit_655510</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> major</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> minor</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-VA" title="powerpc_emit_VA ()">powerpc_emit_VA</a>                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> c</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-VX" title="powerpc_emit_VX ()">powerpc_emit_VX</a>                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-VX-2" title="powerpc_emit_VX_2 ()">powerpc_emit_VX_2</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-X" title="powerpc_emit_X ()">powerpc_emit_X</a>                      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-addi" title="powerpc_emit_addi ()">powerpc_emit_addi</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regd</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> imm</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-b" title="powerpc_emit_b ()">powerpc_emit_b</a>                      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-beq" title="powerpc_emit_beq ()">powerpc_emit_beq</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-bne" title="powerpc_emit_bne ()">powerpc_emit_bne</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-label" title="powerpc_emit_label ()">powerpc_emit_label</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-lwz" title="powerpc_emit_lwz ()">powerpc_emit_lwz</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regd</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> imm</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-ret" title="powerpc_emit_ret ()">powerpc_emit_ret</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-srawi" title="powerpc_emit_srawi ()">powerpc_emit_srawi</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regd</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shift</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> record</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-PowerPC.html#powerpc-emit-stwu" title="powerpc_emit_stwu ()">powerpc_emit_stwu</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regs</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-PowerPC.html#powerpc-get-constant" title="powerpc_get_constant ()">powerpc_get_constant</a>                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> type</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-PowerPC.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-PowerPC.details"></a><h2>Details</h2>
+<div class="refsect2" title="powerpc_get_regname ()">
+<a name="powerpc-get-regname"></a><h3>powerpc_get_regname ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        powerpc_get_regname                 (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_regnum ()">
+<a name="powerpc-regnum"></a><h3>powerpc_regnum ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 powerpc_regnum                      (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_add_fixup ()">
+<a name="powerpc-add-fixup"></a><h3>powerpc_add_fixup ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_add_fixup                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> type</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">char</span> *ptr</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_do_fixups ()">
+<a name="powerpc-do-fixups"></a><h3>powerpc_do_fixups ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_do_fixups                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit ()">
+<a name="powerpc-emit"></a><h3>powerpc_emit ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit                        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_655510 ()">
+<a name="powerpc-emit-655510"></a><h3>powerpc_emit_655510 ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_655510                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> major</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> minor</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>major</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>minor</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_VA ()">
+<a name="powerpc-emit-VA"></a><h3>powerpc_emit_VA ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_VA                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> c</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_VX ()">
+<a name="powerpc-emit-VX"></a><h3>powerpc_emit_VX ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_VX                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_VX_2 ()">
+<a name="powerpc-emit-VX-2"></a><h3>powerpc_emit_VX_2 ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_VX_2                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_X ()">
+<a name="powerpc-emit-X"></a><h3>powerpc_emit_X ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_X                      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code>unsigned <span class="type">int</span> insn</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> d</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> a</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> b</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_addi ()">
+<a name="powerpc-emit-addi"></a><h3>powerpc_emit_addi ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_addi                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regd</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> imm</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>regd</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rega</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>imm</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_b ()">
+<a name="powerpc-emit-b"></a><h3>powerpc_emit_b ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_b                      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_beq ()">
+<a name="powerpc-emit-beq"></a><h3>powerpc_emit_beq ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_beq                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_bne ()">
+<a name="powerpc-emit-bne"></a><h3>powerpc_emit_bne ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_bne                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_label ()">
+<a name="powerpc-emit-label"></a><h3>powerpc_emit_label ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_label                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_lwz ()">
+<a name="powerpc-emit-lwz"></a><h3>powerpc_emit_lwz ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_lwz                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regd</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> imm</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>regd</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rega</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>imm</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_ret ()">
+<a name="powerpc-emit-ret"></a><h3>powerpc_emit_ret ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_ret                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_srawi ()">
+<a name="powerpc-emit-srawi"></a><h3>powerpc_emit_srawi ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_srawi                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regd</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shift</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> record</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>regd</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rega</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>shift</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>record</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_emit_stwu ()">
+<a name="powerpc-emit-stwu"></a><h3>powerpc_emit_stwu ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                powerpc_emit_stwu                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> regs</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> rega</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>regs</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rega</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="powerpc_get_constant ()">
+<a name="powerpc-get-constant"></a><h3>powerpc_get_constant ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 powerpc_get_constant                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> type</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-SSE.html b/doc/html/orc-SSE.html
new file mode 100644 (file)
index 0000000..d496771
--- /dev/null
@@ -0,0 +1,698 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>SSE</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch04.html" title="Code Generation">
+<link rel="prev" href="orc-PowerPC.html" title="PowerPC">
+<link rel="next" href="orc-x86.html" title="x86">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-PowerPC.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-x86.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-SSE.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-SSE.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="SSE">
+<a name="orc-SSE"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-SSE.top_of_page"></a>SSE</span></h2>
+<p>SSE â€” code generation for SSE</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-SSE.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">enum                <a class="link" href="orc-SSE.html#OrcSSERegister" title="enum OrcSSERegister">OrcSSERegister</a>;
+enum                <a class="link" href="orc-SSE.html#OrcTargetSSEFlags" title="enum OrcTargetSSEFlags">OrcTargetSSEFlags</a>;
+#define             <a class="link" href="orc-SSE.html#ORC-SSE-SHUF:CAPS" title="ORC_SSE_SHUF()">ORC_SSE_SHUF</a>                        (a,
+                                                         b,
+                                                         c,
+                                                         d)
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-0f" title="orc_sse_emit_0f ()">orc_sse_emit_0f</a>                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-660f" title="orc_sse_emit_660f ()">orc_sse_emit_660f</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-f20f" title="orc_sse_emit_f20f ()">orc_sse_emit_f20f</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-f30f" title="orc_sse_emit_f30f ()">orc_sse_emit_f30f</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-loadib" title="orc_sse_emit_loadib ()">orc_sse_emit_loadib</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-loadil" title="orc_sse_emit_loadil ()">orc_sse_emit_loadil</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-loadiw" title="orc_sse_emit_loadiw ()">orc_sse_emit_loadiw</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-loadpb" title="orc_sse_emit_loadpb ()">orc_sse_emit_loadpb</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-loadpl" title="orc_sse_emit_loadpl ()">orc_sse_emit_loadpl</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-loadpq" title="orc_sse_emit_loadpq ()">orc_sse_emit_loadpq</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-loadpw" title="orc_sse_emit_loadpw ()">orc_sse_emit_loadpw</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-pshufd" title="orc_sse_emit_pshufd ()">orc_sse_emit_pshufd</a>                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shuf</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-pshuflw" title="orc_sse_emit_pshuflw ()">orc_sse_emit_pshuflw</a>                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shuf</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-emit-shiftimm" title="orc_sse_emit_shiftimm ()">orc_sse_emit_shiftimm</a>               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> modrm_code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shift</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+unsigned <span class="returnvalue">int</span>        <a class="link" href="orc-SSE.html#orc-sse-get-cpu-flags" title="orc_sse_get_cpu_flags ()">orc_sse_get_cpu_flags</a>               (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-SSE.html#orc-sse-init" title="orc_sse_init ()">orc_sse_init</a>                        (<em class="parameter"><code><span class="type">void</span></code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-SSE.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-SSE.details"></a><h2>Details</h2>
+<div class="refsect2" title="enum OrcSSERegister">
+<a name="OrcSSERegister"></a><h3>enum OrcSSERegister</h3>
+<pre class="programlisting">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;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum OrcTargetSSEFlags">
+<a name="OrcTargetSSEFlags"></a><h3>enum OrcTargetSSEFlags</h3>
+<pre class="programlisting">typedef enum {
+  ORC_TARGET_SSE_SSE2 = (1&lt;&lt;0),
+  ORC_TARGET_SSE_SSE3 = (1&lt;&lt;1),
+  ORC_TARGET_SSE_SSSE3 = (1&lt;&lt;2),
+  ORC_TARGET_SSE_SSE4_1 = (1&lt;&lt;3),
+  ORC_TARGET_SSE_SSE4_2 = (1&lt;&lt;4),
+  ORC_TARGET_SSE_SSE4A = (1&lt;&lt;5),
+  ORC_TARGET_SSE_SSE5 = (1&lt;&lt;6),
+  ORC_TARGET_SSE_FRAME_POINTER = (1&lt;&lt;7),
+  ORC_TARGET_SSE_SHORT_JUMPS = (1&lt;&lt;8),
+  ORC_TARGET_SSE_64BIT = (1&lt;&lt;9)
+}OrcTargetSSEFlags;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_SSE_SHUF()">
+<a name="ORC-SSE-SHUF:CAPS"></a><h3>ORC_SSE_SHUF()</h3>
+<pre class="programlisting">#define ORC_SSE_SHUF(a,b,c,d) ((((a)&amp;3)&lt;&lt;6)|(((b)&amp;3)&lt;&lt;4)|(((c)&amp;3)&lt;&lt;2)|(((d)&amp;3)&lt;&lt;0))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_0f ()">
+<a name="orc-sse-emit-0f"></a><h3>orc_sse_emit_0f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_0f                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_660f ()">
+<a name="orc-sse-emit-660f"></a><h3>orc_sse_emit_660f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_660f                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_f20f ()">
+<a name="orc-sse-emit-f20f"></a><h3>orc_sse_emit_f20f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_f20f                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_f30f ()">
+<a name="orc-sse-emit-f30f"></a><h3>orc_sse_emit_f30f ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_f30f                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_loadib ()">
+<a name="orc-sse-emit-loadib"></a><h3>orc_sse_emit_loadib ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_loadib                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_loadil ()">
+<a name="orc-sse-emit-loadil"></a><h3>orc_sse_emit_loadil ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_loadil                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_loadiw ()">
+<a name="orc-sse-emit-loadiw"></a><h3>orc_sse_emit_loadiw ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_loadiw                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_loadpb ()">
+<a name="orc-sse-emit-loadpb"></a><h3>orc_sse_emit_loadpb ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_loadpb                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_loadpl ()">
+<a name="orc-sse-emit-loadpl"></a><h3>orc_sse_emit_loadpl ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_loadpl                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_loadpq ()">
+<a name="orc-sse-emit-loadpq"></a><h3>orc_sse_emit_loadpq ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_loadpq                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_loadpw ()">
+<a name="orc-sse-emit-loadpw"></a><h3>orc_sse_emit_loadpw ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_loadpw                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_pshufd ()">
+<a name="orc-sse-emit-pshufd"></a><h3>orc_sse_emit_pshufd ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_pshufd                 (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shuf</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>shuf</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_pshuflw ()">
+<a name="orc-sse-emit-pshuflw"></a><h3>orc_sse_emit_pshuflw ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_pshuflw                (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shuf</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> src</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> dest</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>shuf</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_emit_shiftimm ()">
+<a name="orc-sse-emit-shiftimm"></a><h3>orc_sse_emit_shiftimm ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_emit_shiftimm               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *insn_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> modrm_code</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> shift</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn_name</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>modrm_code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>shift</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_get_cpu_flags ()">
+<a name="orc-sse-get-cpu-flags"></a><h3>orc_sse_get_cpu_flags ()</h3>
+<pre class="programlisting">unsigned <span class="returnvalue">int</span>        orc_sse_get_cpu_flags               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_sse_init ()">
+<a name="orc-sse-init"></a><h3>orc_sse_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_sse_init                        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ 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 (file)
index 0000000..2992557
--- /dev/null
@@ -0,0 +1,245 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Utility functions</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch03.html" title="Extension API">
+<link rel="prev" href="orc-OrcOpcode.html" title="OrcOpcode">
+<link rel="next" href="orc-OrcRule.html" title="OrcRule">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-OrcOpcode.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-OrcRule.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-Utility-functions.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-Utility-functions.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="Utility functions">
+<a name="orc-Utility-functions"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-Utility-functions.top_of_page"></a>Utility functions</span></h2>
+<p>Utility functions â€” Orc utility functions</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-Utility-functions.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">typedef             <a class="link" href="orc-Utility-functions.html#orc-bool" title="orc_bool">orc_bool</a>;
+#define             <a class="link" href="orc-Utility-functions.html#ORC-ASSERT:CAPS" title="ORC_ASSERT()">ORC_ASSERT</a>                          (test)
+#define             <a class="link" href="orc-Utility-functions.html#ORC-BEGIN-DECLS:CAPS" title="ORC_BEGIN_DECLS">ORC_BEGIN_DECLS</a>
+#define             <a class="link" href="orc-Utility-functions.html#ORC-CLAMP:CAPS" title="ORC_CLAMP()">ORC_CLAMP</a>                           (x,
+                                                         a,
+                                                         b)
+#define             <a class="link" href="orc-Utility-functions.html#ORC-END-DECLS:CAPS" title="ORC_END_DECLS">ORC_END_DECLS</a>
+#define             <a class="link" href="orc-Utility-functions.html#ORC-EXPORT:CAPS" title="ORC_EXPORT">ORC_EXPORT</a>
+#define             <a class="link" href="orc-Utility-functions.html#ORC-GNUC-PREREQ:CAPS" title="ORC_GNUC_PREREQ()">ORC_GNUC_PREREQ</a>                     (maj,
+                                                         min)
+#define             <a class="link" href="orc-Utility-functions.html#ORC-GNU-PRINTF:CAPS" title="ORC_GNU_PRINTF()">ORC_GNU_PRINTF</a>                      (a,
+                                                         b)
+#define             <a class="link" href="orc-Utility-functions.html#ORC-INTERNAL:CAPS" title="ORC_INTERNAL">ORC_INTERNAL</a>
+#define             <a class="link" href="orc-Utility-functions.html#ORC-PTR-TO-INT:CAPS" title="ORC_PTR_TO_INT()">ORC_PTR_TO_INT</a>                      (x)
+#define             <a class="link" href="orc-Utility-functions.html#ORC-READ-UINT32-LE:CAPS" title="ORC_READ_UINT32_LE()">ORC_READ_UINT32_LE</a>                  (ptr)
+#define             <a class="link" href="orc-Utility-functions.html#ORC-WRITE-UINT32-LE:CAPS" title="ORC_WRITE_UINT32_LE()">ORC_WRITE_UINT32_LE</a>                 (ptr,
+                                                         val)
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-Utility-functions.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-Utility-functions.details"></a><h2>Details</h2>
+<div class="refsect2" title="orc_bool">
+<a name="orc-bool"></a><h3>orc_bool</h3>
+<pre class="programlisting">typedef unsigned int orc_bool;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_ASSERT()">
+<a name="ORC-ASSERT:CAPS"></a><h3>ORC_ASSERT()</h3>
+<pre class="programlisting">#define             ORC_ASSERT(test)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>test</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_BEGIN_DECLS">
+<a name="ORC-BEGIN-DECLS:CAPS"></a><h3>ORC_BEGIN_DECLS</h3>
+<pre class="programlisting">#define             ORC_BEGIN_DECLS</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_CLAMP()">
+<a name="ORC-CLAMP:CAPS"></a><h3>ORC_CLAMP()</h3>
+<pre class="programlisting">#define ORC_CLAMP(x,a,b) ((x)&lt;(a) ? (a) : ((x)&gt;(b) ? (b) : (x)))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_END_DECLS">
+<a name="ORC-END-DECLS:CAPS"></a><h3>ORC_END_DECLS</h3>
+<pre class="programlisting">#define             ORC_END_DECLS</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_EXPORT">
+<a name="ORC-EXPORT:CAPS"></a><h3>ORC_EXPORT</h3>
+<pre class="programlisting">#define             ORC_EXPORT</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_GNUC_PREREQ()">
+<a name="ORC-GNUC-PREREQ:CAPS"></a><h3>ORC_GNUC_PREREQ()</h3>
+<pre class="programlisting">#define             ORC_GNUC_PREREQ(maj, min)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>maj</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>min</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_GNU_PRINTF()">
+<a name="ORC-GNU-PRINTF:CAPS"></a><h3>ORC_GNU_PRINTF()</h3>
+<pre class="programlisting">#define             ORC_GNU_PRINTF(a,b)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_INTERNAL">
+<a name="ORC-INTERNAL:CAPS"></a><h3>ORC_INTERNAL</h3>
+<pre class="programlisting">#define             ORC_INTERNAL</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_PTR_TO_INT()">
+<a name="ORC-PTR-TO-INT:CAPS"></a><h3>ORC_PTR_TO_INT()</h3>
+<pre class="programlisting">#define ORC_PTR_TO_INT(x) ((int)(long)(x))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_READ_UINT32_LE()">
+<a name="ORC-READ-UINT32-LE:CAPS"></a><h3>ORC_READ_UINT32_LE()</h3>
+<pre class="programlisting">#define             ORC_READ_UINT32_LE(ptr)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_WRITE_UINT32_LE()">
+<a name="ORC-WRITE-UINT32-LE:CAPS"></a><h3>ORC_WRITE_UINT32_LE()</h3>
+<pre class="programlisting">#define             ORC_WRITE_UINT32_LE(ptr,val)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-building.html b/doc/html/orc-building.html
new file mode 100644 (file)
index 0000000..0d68b55
--- /dev/null
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Building Orc and Applications That Use Orc</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch01.html" title="Overview">
+<link rel="prev" href="ch01.html" title="Overview">
+<link rel="next" href="orc-concepts.html" title="Orc Concepts">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-concepts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry" title="Building Orc and Applications That Use Orc">
+<a name="orc-building"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Building Orc and Applications That Use Orc</span></h2>
+<p>Building Orc and Applications that use Orc â€” 
+How to build Orc and applications using it.
+</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1" title="Building Orc on UNIX">
+<a name="id2937229"></a><h2>Building Orc on UNIX</h2>
+<p>
+    On UNIX, Orc uses the standard GNU build system,
+    using <span class="application">autoconf</span> for package
+    configuration and resolving portability issues,
+    <span class="application">automake</span> for building makefiles
+    that comply with the GNU Coding Standards, and
+    <span class="application">libtool</span> for building shared
+    libraries on multiple platforms.  The normal sequence for
+    compiling and installing the Orc library is thus:
+
+    </p>
+<div class="literallayout"><p><br>
+      <strong class="userinput"><code>./configure</code></strong><br>
+      <strong class="userinput"><code>make</code></strong><br>
+      <strong class="userinput"><code>make install</code></strong><br>
+    </p></div>
+<p>
+  </p>
+<p>
+    The standard options provided by <span class="application">GNU
+    autoconf</span> may be passed to the
+    <span class="command"><strong>configure</strong></span> script.  Please see the
+    <span class="application">autoconf</span> documentation or run
+    <span class="command"><strong>./configure --help</strong></span> for information about
+    the standard options.
+  </p>
+<p>
+    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.
+  </p>
+</div>
+<div class="refsect1" title="Building Orc Applications">
+<a name="id2973799"></a><h2>Building Orc Applications</h2>
+<p>
+Applications and libraries can use <span class="command"><strong>pkg-config</strong></span> to get all the
+needed compiler and linker flags to build against Orc.  The following
+commands will provide the necessary compiler and linker flags:
+
+</p>
+<div class="literallayout"><p><br>
+  <strong class="userinput"><code>pkg-config --cflags orc-0.4</code></strong><br>
+  <strong class="userinput"><code>pkg-config --libs orc-0.4</code></strong><br>
+</p></div>
+<p>
+</p>
+<p>
+When compiling from source, the default installation directory is not
+in the default path for the <span class="command"><strong>pkg-config</strong></span>, so you may
+need to set the PKG_CONFIG_DIR environment variable.
+</p>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-concepts.html b/doc/html/orc-concepts.html
new file mode 100644 (file)
index 0000000..d11760f
--- /dev/null
@@ -0,0 +1,236 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Orc Concepts</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch01.html" title="Overview">
+<link rel="prev" href="orc-building.html" title="Building Orc and Applications That Use Orc">
+<link rel="next" href="orc-tutorial.html" title="Orc Tutorial">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="orc-building.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="orc-tutorial.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry" title="Orc Concepts">
+<a name="orc-concepts"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Orc Concepts</span></h2>
+<p>Orc Concepts â€” 
+High-level view of what Orc does.
+</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1" title="Orc Concepts">
+<a name="id2963035"></a><h2>Orc Concepts</h2>
+<p>
+    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.
+  </p>
+<p>
+    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:
+
+    </p>
+<pre class="programlisting">
+      void function (int *dest, int *src1, int *src2, int n)
+      {
+        int i;
+       for (i = 0; i &lt; n; i++) {
+         dest[i] = (src1[i] + src2[i] + 1) &gt;&gt; 1;
+       }
+      }
+    </pre>
+<p>
+
+  </p>
+<p>
+    Orc is primarily targetted toward generating code for vector
+    CPU extensions such as SSE, Altivec, and NEON.
+  </p>
+<p>
+    Possible usage patterns:
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    A wide variety of additional workflows are possible, although
+    tools are not yet available to make it convenient.
+  </p>
+<p>
+  </p>
+<p>
+  </p>
+</div>
+<div class="refsect1" title="Concepts">
+<a name="id2962968"></a><h2>Concepts</h2>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  The arrays that Orc programs operate on must be contiguous.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.  
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+</div>
+<div class="refsect1" title="Extending Orc">
+<a name="id2930573"></a><h2>Extending Orc</h2>
+<p>
+  Developers can extend Orc primarily by adding new opcode sets, adding
+  new targets, and by adding new target rules.
+</p>
+<p>
+  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.
+</p>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-misc.html b/doc/html/orc-misc.html
new file mode 100644 (file)
index 0000000..d25c018
--- /dev/null
@@ -0,0 +1,505 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>misc</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch05.html" title="Herein lie dragons">
+<link rel="prev" href="ch05.html" title="Herein lie dragons">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch05.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td> </td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-misc.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-misc.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="misc">
+<a name="orc-misc"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-misc.top_of_page"></a>misc</span></h2>
+<p>misc</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-misc.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">                    <a class="link" href="orc-misc.html#OrcVariable" title="OrcVariable">OrcVariable</a>;
+                    <a class="link" href="orc-misc.html#OrcInstruction" title="OrcInstruction">OrcInstruction</a>;
+                    <a class="link" href="orc-misc.html#OrcRule" title="OrcRule">OrcRule</a>;
+                    <a class="link" href="orc-misc.html#OrcFixup" title="OrcFixup">OrcFixup</a>;
+<span class="returnvalue">void</span>                (<a class="link" href="orc-misc.html#OrcRuleEmitFunc" title="OrcRuleEmitFunc ()">*OrcRuleEmitFunc</a>)                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *user</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-misc.html#OrcInstruction" title="OrcInstruction"><span class="type">OrcInstruction</span></a> *insn</code></em>);
+#define             <a class="link" href="orc-misc.html#ORC-N-REGS:CAPS" title="ORC_N_REGS">ORC_N_REGS</a>
+#define             <a class="link" href="orc-misc.html#ORC-N-INSNS:CAPS" title="ORC_N_INSNS">ORC_N_INSNS</a>
+#define             <a class="link" href="orc-misc.html#ORC-N-VARIABLES:CAPS" title="ORC_N_VARIABLES">ORC_N_VARIABLES</a>
+#define             <a class="link" href="orc-misc.html#ORC-N-REGISTERS:CAPS" title="ORC_N_REGISTERS">ORC_N_REGISTERS</a>
+#define             <a class="link" href="orc-misc.html#ORC-N-FIXUPS:CAPS" title="ORC_N_FIXUPS">ORC_N_FIXUPS</a>
+#define             <a class="link" href="orc-misc.html#ORC-N-LABELS:CAPS" title="ORC_N_LABELS">ORC_N_LABELS</a>
+#define             <a class="link" href="orc-misc.html#ORC-GP-REG-BASE:CAPS" title="ORC_GP_REG_BASE">ORC_GP_REG_BASE</a>
+#define             <a class="link" href="orc-misc.html#ORC-VEC-REG-BASE:CAPS" title="ORC_VEC_REG_BASE">ORC_VEC_REG_BASE</a>
+#define             <a class="link" href="orc-misc.html#ORC-STRUCT-OFFSET:CAPS" title="ORC_STRUCT_OFFSET()">ORC_STRUCT_OFFSET</a>                   (struct_type,
+                                                         member)
+enum                <a class="link" href="orc-misc.html#OrcVarType" title="enum OrcVarType">OrcVarType</a>;
+<span class="returnvalue">void</span>                <a class="link" href="orc-misc.html#orc-powerpc-init" title="orc_powerpc_init ()">orc_powerpc_init</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-misc.html#orc-arm-init" title="orc_arm_init ()">orc_arm_init</a>                        (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-misc.html#orc-c-init" title="orc_c_init ()">orc_c_init</a>                          (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-misc.html#orc-parse" title="orc_parse ()">orc_parse</a>                           (<em class="parameter"><code>const <span class="type">char</span> *code</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> ***programs</code></em>);
+#define             <a class="link" href="orc-misc.html#ARRAY-SIZE:CAPS" title="ARRAY_SIZE()">ARRAY_SIZE</a>                          (x)
+#define             <a class="link" href="orc-misc.html#MAX:CAPS" title="MAX()">MAX</a>                                 (a,
+                                                         b)
+#define             <a class="link" href="orc-misc.html#MIN:CAPS" title="MIN()">MIN</a>                                 (a,
+                                                         b)
+<span class="returnvalue">char</span> *              <a class="link" href="orc-misc.html#get-cpuinfo-line" title="get_cpuinfo_line ()">get_cpuinfo_line</a>                    (<em class="parameter"><code><span class="type">char</span> *cpuinfo</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *tag</code></em>);
+<span class="returnvalue">char</span> *              <a class="link" href="orc-misc.html#get-file" title="get_file ()">get_file</a>                            (<em class="parameter"><code>const <span class="type">char</span> *file</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-misc.html#get-file-int" title="get_file_int ()">get_file_int</a>                        (<em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> *value</code></em>);
+<span class="returnvalue">char</span> *              <a class="link" href="orc-misc.html#get-tag-value" title="get_tag_value ()">get_tag_value</a>                       (<em class="parameter"><code><span class="type">char</span> *s</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *tag</code></em>);
+<span class="returnvalue">char</span> **             <a class="link" href="orc-misc.html#strsplit" title="strsplit ()">strsplit</a>                            (<em class="parameter"><code>const <span class="type">char</span> *s</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> delimiter</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-misc.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-misc.details"></a><h2>Details</h2>
+<div class="refsect2" title="OrcVariable">
+<a name="OrcVariable"></a><h3>OrcVariable</h3>
+<pre class="programlisting">typedef struct {
+} OrcVariable;
+</pre>
+<p>
+The OrcVariable structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcInstruction">
+<a name="OrcInstruction"></a><h3>OrcInstruction</h3>
+<pre class="programlisting">typedef struct {
+} OrcInstruction;
+</pre>
+<p>
+The OrcInstruction structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcRule">
+<a name="OrcRule"></a><h3>OrcRule</h3>
+<pre class="programlisting">typedef struct {
+} OrcRule;
+</pre>
+<p>
+The OrcRule structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcFixup">
+<a name="OrcFixup"></a><h3>OrcFixup</h3>
+<pre class="programlisting">typedef struct {
+} OrcFixup;
+</pre>
+<p>
+The OrcFixup structure has no public members
+</p>
+</div>
+<hr>
+<div class="refsect2" title="OrcRuleEmitFunc ()">
+<a name="OrcRuleEmitFunc"></a><h3>OrcRuleEmitFunc ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                (*OrcRuleEmitFunc)                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *user</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-misc.html#OrcInstruction" title="OrcInstruction"><span class="type">OrcInstruction</span></a> *insn</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>insn</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_REGS">
+<a name="ORC-N-REGS:CAPS"></a><h3>ORC_N_REGS</h3>
+<pre class="programlisting">#define ORC_N_REGS (32*4)
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_INSNS">
+<a name="ORC-N-INSNS:CAPS"></a><h3>ORC_N_INSNS</h3>
+<pre class="programlisting">#define ORC_N_INSNS 100
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_VARIABLES">
+<a name="ORC-N-VARIABLES:CAPS"></a><h3>ORC_N_VARIABLES</h3>
+<pre class="programlisting">#define ORC_N_VARIABLES 64
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_REGISTERS">
+<a name="ORC-N-REGISTERS:CAPS"></a><h3>ORC_N_REGISTERS</h3>
+<pre class="programlisting">#define ORC_N_REGISTERS 20
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_FIXUPS">
+<a name="ORC-N-FIXUPS:CAPS"></a><h3>ORC_N_FIXUPS</h3>
+<pre class="programlisting">#define ORC_N_FIXUPS 100
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_N_LABELS">
+<a name="ORC-N-LABELS:CAPS"></a><h3>ORC_N_LABELS</h3>
+<pre class="programlisting">#define ORC_N_LABELS 40
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_GP_REG_BASE">
+<a name="ORC-GP-REG-BASE:CAPS"></a><h3>ORC_GP_REG_BASE</h3>
+<pre class="programlisting">#define ORC_GP_REG_BASE 32
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_VEC_REG_BASE">
+<a name="ORC-VEC-REG-BASE:CAPS"></a><h3>ORC_VEC_REG_BASE</h3>
+<pre class="programlisting">#define ORC_VEC_REG_BASE 64
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="ORC_STRUCT_OFFSET()">
+<a name="ORC-STRUCT-OFFSET:CAPS"></a><h3>ORC_STRUCT_OFFSET()</h3>
+<pre class="programlisting">#define             ORC_STRUCT_OFFSET(struct_type, member)</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>struct_type</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>member</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="enum OrcVarType">
+<a name="OrcVarType"></a><h3>enum OrcVarType</h3>
+<pre class="programlisting">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;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_powerpc_init ()">
+<a name="orc-powerpc-init"></a><h3>orc_powerpc_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_powerpc_init                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_arm_init ()">
+<a name="orc-arm-init"></a><h3>orc_arm_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_arm_init                        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_c_init ()">
+<a name="orc-c-init"></a><h3>orc_c_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_c_init                          (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="orc_parse ()">
+<a name="orc-parse"></a><h3>orc_parse ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_parse                           (<em class="parameter"><code>const <span class="type">char</span> *code</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-OrcProgram.html#OrcProgram" title="OrcProgram"><span class="type">OrcProgram</span></a> ***programs</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>programs</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="ARRAY_SIZE()">
+<a name="ARRAY-SIZE:CAPS"></a><h3>ARRAY_SIZE()</h3>
+<pre class="programlisting">#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="MAX()">
+<a name="MAX:CAPS"></a><h3>MAX()</h3>
+<pre class="programlisting">#define MAX(a,b) ((a)&gt;(b) ? (a) : (b))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="MIN()">
+<a name="MIN:CAPS"></a><h3>MIN()</h3>
+<pre class="programlisting">#define MIN(a,b) ((a)&lt;(b) ? (a) : (b))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="get_cpuinfo_line ()">
+<a name="get-cpuinfo-line"></a><h3>get_cpuinfo_line ()</h3>
+<pre class="programlisting"><span class="returnvalue">char</span> *              get_cpuinfo_line                    (<em class="parameter"><code><span class="type">char</span> *cpuinfo</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *tag</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>cpuinfo</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="get_file ()">
+<a name="get-file"></a><h3>get_file ()</h3>
+<pre class="programlisting"><span class="returnvalue">char</span> *              get_file                            (<em class="parameter"><code>const <span class="type">char</span> *file</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="get_file_int ()">
+<a name="get-file-int"></a><h3>get_file_int ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 get_file_int                        (<em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> *value</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="get_tag_value ()">
+<a name="get-tag-value"></a><h3>get_tag_value ()</h3>
+<pre class="programlisting"><span class="returnvalue">char</span> *              get_tag_value                       (<em class="parameter"><code><span class="type">char</span> *s</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">char</span> *tag</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="strsplit ()">
+<a name="strsplit"></a><h3>strsplit ()</h3>
+<pre class="programlisting"><span class="returnvalue">char</span> **             strsplit                            (<em class="parameter"><code>const <span class="type">char</span> *s</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> delimiter</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>delimiter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-opcodes.html b/doc/html/orc-opcodes.html
new file mode 100644 (file)
index 0000000..afa619f
--- /dev/null
@@ -0,0 +1,3358 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Orc Opcodes</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch02.html" title="Application API">
+<link rel="prev" href="orc-OrcExecutor.html" title="OrcExecutor">
+<link rel="next" href="ch03.html" title="Extension API">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="orc-OrcExecutor.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="ch03.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry" title="Orc Opcodes">
+<a name="orc-opcodes"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Orc Opcodes</span></h2>
+<p>Orc Opcodes â€” 
+Description of Opcodes
+</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1" title="Orc Opcodes">
+<a name="id2990339"></a><h2>Orc Opcodes</h2>
+<p>
+    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.
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    The "merge" opcodes take two values and put them together in
+    memory order.
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    Shift opcodes only work with constants or parameters as the
+    second source value.
+  </p>
+<p>
+    For more precise understanding of operations, it is recommended
+    to compile a program for the C target and examine the resulting C
+    source code.
+  </p>
+<div class="table">
+<a name="table-basictypes"></a><p class="title"><b>Table 1. Table of Opcodes</b></p>
+<div class="table-contents"><table summary="Table of Opcodes" border="1">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th align="left">opcode</th>
+<th align="left">destination size</th>
+<th align="left">source 1 size</th>
+<th align="left">source 2 size</th>
+<th align="left">description</th>
+<th align="left">pseudo code</th>
+</tr></thead>
+<tbody valign="top">
+<tr>
+<td align="left" valign="top">absb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">absolute value</td>
+<td align="left" valign="top">(a &lt; 0) ? -a : a</td>
+</tr>
+<tr>
+<td align="left" valign="top">addb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">add</td>
+<td align="left" valign="top">a + b</td>
+</tr>
+<tr>
+<td align="left" valign="top">addssb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">add with signed saturate</td>
+<td align="left" valign="top">clamp(a + b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">addusb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">add with unsigned saturate</td>
+<td align="left" valign="top">clamp(a + b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">andb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">bitwise AND</td>
+<td align="left" valign="top">a &amp; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">andnb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">bitwise AND NOT</td>
+<td align="left" valign="top">a &amp; (~b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgsb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">signed average</td>
+<td align="left" valign="top">(a + b + 1)&gt;&gt;1</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgub</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">unsigned average</td>
+<td align="left" valign="top">(a + b + 1)&gt;&gt;1</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">compare equal</td>
+<td align="left" valign="top">(a == b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">compare greater than</td>
+<td align="left" valign="top">(a &gt; b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">copy</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load from memory</td>
+<td align="left" valign="top">array[i]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadoffb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">load from memory with offset</td>
+<td align="left" valign="top">array[i+offset]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadupdb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load upsampled duplicate</td>
+<td align="left" valign="top">array[i&gt;&gt;1]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadupib</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load upsampled interpolate</td>
+<td align="left" valign="top">(array[i&gt;&gt;1] + array[(i+1)&gt;&gt;1] + 1)&gt;&gt;1</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load parameter or constant</td>
+<td align="left" valign="top">scalar</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldresnearb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">load, nearest neighbor resampled</td>
+<td align="left" valign="top">array[(b+c*i)&gt;&gt;8]</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldresnearl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">load, nearest neighbor resampled</td>
+<td align="left" valign="top">array[(b+c*i)&gt;&gt;8]</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldreslinb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">load, bilinear resampled</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldreslinl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">load, bilinear resampled</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxsb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">signed maximum</td>
+<td align="left" valign="top">(a &gt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxub</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">unsigned maximum</td>
+<td align="left" valign="top">(a &gt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">minsb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">signed minimum</td>
+<td align="left" valign="top">(a &lt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">minub</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">unsigned minimum</td>
+<td align="left" valign="top">(a &lt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mullb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">low bits of multiply</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhsb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">high bits of signed multiply</td>
+<td align="left" valign="top">(a * b) &gt;&gt; 8</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhub</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">high bits of unsigned multiply</td>
+<td align="left" valign="top">(a * b) &gt;&gt; 8</td>
+</tr>
+<tr>
+<td align="left" valign="top">orb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">bitwise or</td>
+<td align="left" valign="top">a | b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shlb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1S</td>
+<td align="left" valign="top">shift left</td>
+<td align="left" valign="top">a &lt;&lt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1S</td>
+<td align="left" valign="top">signed shift right</td>
+<td align="left" valign="top">a &gt;&gt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrub</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1S</td>
+<td align="left" valign="top">unsigned shift right</td>
+<td align="left" valign="top">a &gt;&gt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">signb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">sign</td>
+<td align="left" valign="top">sign(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">storeb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">store to memory</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">subb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">subtract</td>
+<td align="left" valign="top">a - b</td>
+</tr>
+<tr>
+<td align="left" valign="top">subssb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">subtract with signed saturate</td>
+<td align="left" valign="top">clamp(a - b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">subusb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">subtract with unsigned saturate</td>
+<td align="left" valign="top">clamp(a - b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">xorb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">bitwise XOR</td>
+<td align="left" valign="top">a ^ b</td>
+</tr>
+<tr>
+<td align="left" valign="top">absw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">absolute value</td>
+<td align="left" valign="top">(a &lt; 0) ? -a : a</td>
+</tr>
+<tr>
+<td align="left" valign="top">addw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">add</td>
+<td align="left" valign="top">a + b</td>
+</tr>
+<tr>
+<td align="left" valign="top">addssw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">add with signed saturate</td>
+<td align="left" valign="top">clamp(a + b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">addusw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">add with unsigned saturate</td>
+<td align="left" valign="top">clamp(a + b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">andw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">bitwise AND</td>
+<td align="left" valign="top">a &amp; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">andnw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">bitwise AND NOT</td>
+<td align="left" valign="top">a &amp; (~b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgsw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">signed average</td>
+<td align="left" valign="top">(a + b + 1)&gt;&gt;1</td>
+</tr>
+<tr>
+<td align="left" valign="top">avguw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">unsigned average</td>
+<td align="left" valign="top">(a + b + 1)&gt;&gt;1</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">compare equal</td>
+<td align="left" valign="top">(a == b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">compare greater than</td>
+<td align="left" valign="top">(a &gt; b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">copy</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">div255w</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">divide by 255</td>
+<td align="left" valign="top">a/255</td>
+</tr>
+<tr>
+<td align="left" valign="top">divluw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">saturated unsigned divide 16-bit by 8-bit</td>
+<td align="left" valign="top">clamp(a/(b &amp; 255),0,255)</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load from memory</td>
+<td align="left" valign="top">array[i]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadoffw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">load from memory with offset</td>
+<td align="left" valign="top">array[i+offset]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load parameter or constant</td>
+<td align="left" valign="top">scalar</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxsw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">signed maximum</td>
+<td align="left" valign="top">(a &gt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxuw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">unsigned maximum</td>
+<td align="left" valign="top">(a &gt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">minsw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">signed minimum</td>
+<td align="left" valign="top">(a &lt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">minuw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">unsigned minimum</td>
+<td align="left" valign="top">(a &lt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mullw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">low bits of multiply</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhsw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">high bits of signed multiply</td>
+<td align="left" valign="top">(a * b) &gt;&gt; 8</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhuw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">high bits of unsigned multiply</td>
+<td align="left" valign="top">(a * b) &gt;&gt; 8</td>
+</tr>
+<tr>
+<td align="left" valign="top">orw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">bitwise or</td>
+<td align="left" valign="top">a | b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shlw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2S</td>
+<td align="left" valign="top">shift left</td>
+<td align="left" valign="top">a &lt;&lt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2S</td>
+<td align="left" valign="top">signed shift right</td>
+<td align="left" valign="top">a &gt;&gt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shruw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2S</td>
+<td align="left" valign="top">unsigned shift right</td>
+<td align="left" valign="top">a &gt;&gt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">signw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">sign</td>
+<td align="left" valign="top">sign(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">storew</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">store to memory</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">subw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">subtract</td>
+<td align="left" valign="top">a - b</td>
+</tr>
+<tr>
+<td align="left" valign="top">subssw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">subtract with signed saturate</td>
+<td align="left" valign="top">clamp(a - b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">subusw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">subtract with unsigned saturate</td>
+<td align="left" valign="top">clamp(a - b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">xorw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">bitwise XOR</td>
+<td align="left" valign="top">a ^ b</td>
+</tr>
+<tr>
+<td align="left" valign="top">absl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">absolute value</td>
+<td align="left" valign="top">(a &lt; 0) ? -a : a</td>
+</tr>
+<tr>
+<td align="left" valign="top">addl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">add</td>
+<td align="left" valign="top">a + b</td>
+</tr>
+<tr>
+<td align="left" valign="top">addssl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">add with signed saturate</td>
+<td align="left" valign="top">clamp(a + b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">addusl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">add with unsigned saturate</td>
+<td align="left" valign="top">clamp(a + b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">andl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">bitwise AND</td>
+<td align="left" valign="top">a &amp; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">andnl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">bitwise AND NOT</td>
+<td align="left" valign="top">a &amp; (~b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgsl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">signed average</td>
+<td align="left" valign="top">(a + b + 1)&gt;&gt;1</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgul</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">unsigned average</td>
+<td align="left" valign="top">(a + b + 1)&gt;&gt;1</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeql</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">compare equal</td>
+<td align="left" valign="top">(a == b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">compare greater than</td>
+<td align="left" valign="top">(a &gt; b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">copy</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load from memory</td>
+<td align="left" valign="top">array[i]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadoffl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">load from memory with offset</td>
+<td align="left" valign="top">array[i+offset]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load parameter or constant</td>
+<td align="left" valign="top">scalar</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxsl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">signed maximum</td>
+<td align="left" valign="top">(a &gt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxul</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">unsigned maximum</td>
+<td align="left" valign="top">(a &gt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">minsl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">signed minimum</td>
+<td align="left" valign="top">(a &lt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">minul</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">unsigned minimum</td>
+<td align="left" valign="top">(a &lt; b) ? a : b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulll</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">low bits of multiply</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhsl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">high bits of signed multiply</td>
+<td align="left" valign="top">(a * b) &gt;&gt; 16</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhul</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">high bits of unsigned multiply</td>
+<td align="left" valign="top">(a * b) &gt;&gt; 16</td>
+</tr>
+<tr>
+<td align="left" valign="top">orl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">bitwise or</td>
+<td align="left" valign="top">a | b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shll</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">shift left</td>
+<td align="left" valign="top">a &lt;&lt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">signed shift right</td>
+<td align="left" valign="top">a &gt;&gt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrul</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4S</td>
+<td align="left" valign="top">unsigned shift right</td>
+<td align="left" valign="top">a &gt;&gt; b</td>
+</tr>
+<tr>
+<td align="left" valign="top">signl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">sign</td>
+<td align="left" valign="top">sign(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">storel</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">store to memory</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">subl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">subtract</td>
+<td align="left" valign="top">a - b</td>
+</tr>
+<tr>
+<td align="left" valign="top">subssl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">subtract with signed saturate</td>
+<td align="left" valign="top">clamp(a - b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">subusl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">subtract with unsigned saturate</td>
+<td align="left" valign="top">clamp(a - b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">xorl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">bitwise XOR</td>
+<td align="left" valign="top">a ^ b</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load from memory</td>
+<td align="left" valign="top">array[i]</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">load parameter or constant</td>
+<td align="left" valign="top">scalar</td>
+</tr>
+<tr>
+<td align="left" valign="top">storeq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">store to memory</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">splatw3q</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">duplicates high 16-bits to lower 48 bits</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">andq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">andnq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">orq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">xorq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">addq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">subq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">shlq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8S</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8S</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">shruq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8S</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">convsbw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convubw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">splatbw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">duplicates 8 bits to both halfs of 16 bits</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">splatbl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">duplicates 8 bits to all parts of 32 bits</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">convswl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuwl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convslq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">signed convert</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convulq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">unsigned convert</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convwb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convhwb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">shift and convert</td>
+<td align="left" valign="top">a&gt;&gt;8</td>
+</tr>
+<tr>
+<td align="left" valign="top">convssswb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed to signed with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsuswb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed to unsigned with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convusswb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned to signed with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuuswb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned to unsigned with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convlw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convhlw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">shift and convert</td>
+<td align="left" valign="top">a&gt;&gt;16</td>
+</tr>
+<tr>
+<td align="left" valign="top">convssslw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed to signed with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsuslw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed to unsigned with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convusslw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned to signed with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuuslw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned to unsigned with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convql</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsssql</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed to signed with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsusql</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert signed to unsigned with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convussql</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned to signed with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuusql</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert unsigned to unsigned with saturation</td>
+<td align="left" valign="top">clamp(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulsbw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">multiply signed</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulubw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">multiply unsigned</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulswl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">multiply signed</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">muluwl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">multiply unsigned</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">accw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">accumulate</td>
+<td align="left" valign="top">+= a</td>
+</tr>
+<tr>
+<td align="left" valign="top">accl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">accumulate</td>
+<td align="left" valign="top">+= a</td>
+</tr>
+<tr>
+<td align="left" valign="top">accsadubl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">accumulate absolute difference</td>
+<td align="left" valign="top">+= abs(a - b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">swapw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">endianness swap</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">swapl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">endianness swap</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">swapwl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">swapq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">swaplq</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">select0wb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">select first half</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">select1wb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">select second half</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">select0lw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">select first half</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">select1lw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">select second half</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">mergewl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">merge halves</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">mergebw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">merge halves</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">splitql</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">splitlw</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">split first/second words</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">splitwb</td>
+<td align="left" valign="top">1</td>
+<td align="left" valign="top">2</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">split first/second bytes</td>
+<td align="left" valign="top">special</td>
+</tr>
+<tr>
+<td align="left" valign="top">addf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">add</td>
+<td align="left" valign="top">a + b</td>
+</tr>
+<tr>
+<td align="left" valign="top">subf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">subtract</td>
+<td align="left" valign="top">a - b</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">multiply</td>
+<td align="left" valign="top">a * b</td>
+</tr>
+<tr>
+<td align="left" valign="top">divf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">divide</td>
+<td align="left" valign="top">a / b</td>
+</tr>
+<tr>
+<td align="left" valign="top">sqrtf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">square root</td>
+<td align="left" valign="top">sqrt(a)</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">maximum</td>
+<td align="left" valign="top">max(a,b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">minf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">minimum</td>
+<td align="left" valign="top">min(a,b)</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">compare equal</td>
+<td align="left" valign="top">(a == b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpltf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">compare less than</td>
+<td align="left" valign="top">(a == b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmplef</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">compare less than or equal</td>
+<td align="left" valign="top">(a == b) ? (~0) : 0</td>
+</tr>
+<tr>
+<td align="left" valign="top">convfl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert float point to integer</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">convlf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top">convert integer to floating point</td>
+<td align="left" valign="top">a</td>
+</tr>
+<tr>
+<td align="left" valign="top">addd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">subd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">muld</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">divd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">sqrtd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">maxd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">mind</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpltd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpled</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">convdl</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">convld</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">convfd</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+<tr>
+<td align="left" valign="top">convdf</td>
+<td align="left" valign="top">4</td>
+<td align="left" valign="top">8</td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+<td align="left" valign="top"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><p>
+    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.
+  </p>
+</div>
+<div class="refsect1" title="Rule Coverage">
+<a name="id2990256"></a><h2>Rule Coverage</h2>
+<p>
+    The values for shift operations are not correct in this table.
+  </p>
+<div class="table">
+<a name="table-basictypes"></a><p class="title"><b>Table 2. Table of Opcode Rule Coverage</b></p>
+<div class="table-contents"><table summary="Table of Opcode Rule Coverage" border="1">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th align="left">opcode name</th>
+<th align="left">sse</th>
+<th align="left">mmx</th>
+<th align="left">altivec</th>
+<th align="left">arm</th>
+<th align="left">neon</th>
+<th align="left">c64x-c</th>
+</tr></thead>
+<tbody valign="top">
+<tr>
+<td align="left" valign="top">absb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addssb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addusb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andnb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgsb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgub</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadoffb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadupdb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadupib</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldresnearb</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldresnearl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldreslinb</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">ldreslinl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxsb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxub</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">minsb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">minub</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mullb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhsb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhub</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">orb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shlb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrub</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">signb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">storeb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subssb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subusb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">xorb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">absw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addssw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addusw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andnw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgsw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">avguw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">div255w</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">divluw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadoffw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxsw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxuw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">minsw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">minuw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mullw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhsw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhuw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">orw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shlw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shruw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">signw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">storew</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subssw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subusw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">xorw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">absl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addssl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addusl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andnl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgsl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">avgul</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeql</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadoffl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxsl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxul</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">minsl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">minul</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulll</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhsl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulhul</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">orl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shll</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrul</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">signl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">storel</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subssl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subusl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">xorl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">loadpq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">storeq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">splatw3q</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">copyq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqq</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpgtsq</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">andnq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">orq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">xorq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shlq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shrsq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">shruq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsbw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convubw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">splatbw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">splatbl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convswl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuwl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convslq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convulq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convwb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convhwb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convssswb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsuswb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convusswb</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuuswb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convlw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convhlw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convssslw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsuslw</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convusslw</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuuslw</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convql</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsssql</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convsusql</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convussql</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convuusql</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulsbw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulubw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulswl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">muluwl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">accw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">accl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">accsadubl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">swapw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">swapl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">swapwl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">swapq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">swaplq</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">select0wb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">select1wb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">select0lw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">select1lw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mergewl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mergebw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">splitql</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">splitlw</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">splitwb</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mulf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">divf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">sqrtf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">minf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpltf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmplef</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convfl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convlf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">addd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">subd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">muld</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">divd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">sqrtd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">maxd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">mind</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpeqd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpltd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">cmpled</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convdl</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convld</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convfd</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+<tr>
+<td align="left" valign="top">convdf</td>
+<td align="left" valign="top">yes</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+<td align="left" valign="top">no</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break">
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-tutorial.html b/doc/html/orc-tutorial.html
new file mode 100644 (file)
index 0000000..dc1a868
--- /dev/null
@@ -0,0 +1,531 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Orc Tutorial</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch01.html" title="Overview">
+<link rel="prev" href="orc-concepts.html" title="Orc Concepts">
+<link rel="next" href="ch02.html" title="Application API">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="orc-concepts.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="ch02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry" title="Orc Tutorial">
+<a name="orc-tutorial"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Orc Tutorial</span></h2>
+<p>Orc Tutorial â€” 
+Getting started writing Orc code.
+</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1" title="Orc Tutorial">
+<a name="id2900000"></a><h2>Orc Tutorial</h2>
+<p>
+    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.
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    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.
+  </p>
+<p>
+    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.
+  </p>
+</div>
+<div class="refsect1" title="Example 1">
+<a name="id2932491"></a><h2>Example 1</h2>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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".
+</p>
+<p>
+  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.
+</p>
+<p>
+  To the code:
+
+</p>
+<pre class="programlisting">
+.function audio_add_s16
+.dest 2 d1
+.source 2 s1
+.source 2 s2
+
+addssw d1, s1, s2
+</pre>
+<p>
+</p>
+<p>
+  Line by line:
+
+</p>
+<pre class="programlisting">
+.function audio_add_s16
+</pre>
+<p>
+
+  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.
+
+</p>
+<pre class="programlisting">
+.dest 2 d1 short
+</pre>
+<p>
+
+  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.
+
+</p>
+<pre class="programlisting">
+.source 2 s1 short
+.source 2 s2 short
+</pre>
+<p>
+
+  This specifies that you want two source (input) arrays, "s1" and "s2",
+  similar to the destination array.
+
+</p>
+<pre class="programlisting">
+addssw d1, s1, s2
+</pre>
+<p>
+
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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:
+
+</p>
+<pre class="programlisting">
+/* audio_add_s16 */
+#ifdef DISABLE_ORC
+void
+audio_add_s16 (int16 * d1, const int16 * s1, const int16 * s2, int n)
+{
+  ...
+}
+</pre>
+<p>
+  
+  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.
+
+</p>
+<pre class="programlisting">
+#else
+static void
+_backup_audio_add_s16 (OrcExecutor * ORC_RESTRICT ex)
+{
+  ...
+}
+</pre>
+<p>
+  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.
+
+</p>
+<pre class="programlisting">
+void
+audio_add_s16 (short * d1, const short * s1, const short * s2, int n)
+{
+  ...
+}
+</pre>
+<p>
+
+  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.
+</p>
+<p>
+  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():
+
+</p>
+<pre class="programlisting">
+void audio_add_s16 (short * d1, const short * s1, const short * s2, int n);
+</pre>
+<p>
+
+
+</p>
+<p>
+  Some C code to generate sample data, call the generated code, and
+  print out the results:
+
+</p>
+<pre class="programlisting">
+#include &lt;stdio.h&gt;
+#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 &lt; 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 &lt; N;i++){
+    printf("%d: %d %d -&gt; %d\n", i, a[i], b[i], c[i]);
+  }
+
+  return 0;
+}
+</pre>
+<p>
+</p>
+<p>
+  The output of the program:
+
+</p>
+<pre class="programlisting">
+0: 0 32000 -&gt; 32000
+1: 100 32000 -&gt; 32100
+2: 200 32000 -&gt; 32200
+3: 300 32000 -&gt; 32300
+4: 400 32000 -&gt; 32400
+5: 500 32000 -&gt; 32500
+6: 600 32000 -&gt; 32600
+7: 700 32000 -&gt; 32700
+8: 800 32000 -&gt; 32767
+9: 900 32000 -&gt; 32767
+</pre>
+<p>
+</p>
+<p>
+  
+</p>
+</div>
+<div class="refsect1" title="Example 2">
+<a name="id2935554"></a><h2>Example 2</h2>
+<p>
+  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.
+</p>
+<p>
+</p>
+<pre class="programlisting">
+.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
+</pre>
+<p>
+
+  Piece by piece:
+
+</p>
+<pre class="programlisting">
+.function audio_add_mono_to_stereo_scaled_s16
+.dest 4 d1 short
+.source 4 s1 short
+.source 2 s2 short
+</pre>
+<p>
+  
+  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.
+
+</p>
+<pre class="programlisting">
+.param 2 volume
+</pre>
+<p>
+
+  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.
+
+</p>
+<pre class="programlisting">
+.temp 4 s2_scaled
+.temp 2 t
+.temp 4 s2_stereo
+</pre>
+<p>
+
+  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.
+
+</p>
+<pre class="programlisting">
+mulswl s2_scaled, s2, volume
+shrsl s2_scaled, s2_scaled, 12
+</pre>
+<p>
+
+  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.
+
+</p>
+<pre class="programlisting">
+convssslw t, s2_scaled
+mergewl s2_stereo, t, t
+</pre>
+<p>
+
+  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.
+
+</p>
+<pre class="programlisting">
+x2 addssw d1, s1, s2_stereo
+</pre>
+<p>
+
+  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.
+</p>
+<p>
+  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.
+</p>
+</div>
+<div class="refsect1" title="Example 3">
+<a name="id2935677"></a><h2>Example 3</h2>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  The code:
+
+</p>
+<pre class="programlisting">
+.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
+</pre>
+<p>
+
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+<p>
+  The prototype that is generated is:
+
+</p>
+<pre class="programlisting">
+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);
+</pre>
+<p>
+
+  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().
+</p>
+<p>
+  Calling the function:
+
+</p>
+<pre class="programlisting">
+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);
+</pre>
+<p>
+
+</p>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc-x86.html b/doc/html/orc-x86.html
new file mode 100644 (file)
index 0000000..0f727dc
--- /dev/null
@@ -0,0 +1,1727 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>x86</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="index.html" title="Orc Reference Manual">
+<link rel="up" href="ch04.html" title="Code Generation">
+<link rel="prev" href="orc-SSE.html" title="SSE">
+<link rel="next" href="ch05.html" title="Herein lie dragons">
+<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="orc-SSE.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Orc Reference Manual</th>
+<td><a accesskey="n" href="ch05.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#orc-x86.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#orc-x86.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="x86">
+<a name="orc-x86"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="orc-x86.top_of_page"></a>x86</span></h2>
+<p>x86 â€” code generation for x86</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="orc-x86.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis"><span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-add-imm-memoffset" title="orc_x86_emit_add_imm_memoffset ()">orc_x86_emit_add_imm_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-add-imm-reg" title="orc_x86_emit_add_imm_reg ()">orc_x86_emit_add_imm_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-Utility-functions.html#orc-bool" title="orc_bool"><span class="type">orc_bool</span></a> record</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-add-reg-memoffset" title="orc_x86_emit_add_reg_memoffset ()">orc_x86_emit_add_reg_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-align" title="orc_x86_emit_align ()">orc_x86_emit_align</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-and-imm-memoffset" title="orc_x86_emit_and_imm_memoffset ()">orc_x86_emit_and_imm_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-and-imm-reg" title="orc_x86_emit_and_imm_reg ()">orc_x86_emit_and_imm_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-cmp-imm-memoffset" title="orc_x86_emit_cmp_imm_memoffset ()">orc_x86_emit_cmp_imm_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-cmp-reg-memoffset" title="orc_x86_emit_cmp_reg_memoffset ()">orc_x86_emit_cmp_reg_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-dec-memoffset" title="orc_x86_emit_dec_memoffset ()">orc_x86_emit_dec_memoffset</a>          (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-emms" title="orc_x86_emit_emms ()">orc_x86_emit_emms</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-epilogue" title="orc_x86_emit_epilogue ()">orc_x86_emit_epilogue</a>               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-je" title="orc_x86_emit_je ()">orc_x86_emit_je</a>                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-jle" title="orc_x86_emit_jle ()">orc_x86_emit_jle</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-jmp" title="orc_x86_emit_jmp ()">orc_x86_emit_jmp</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-jne" title="orc_x86_emit_jne ()">orc_x86_emit_jne</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-label" title="orc_x86_emit_label ()">orc_x86_emit_label</a>                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-modrm-memoffset" title="orc_x86_emit_modrm_memoffset ()">orc_x86_emit_modrm_memoffset</a>        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-modrm-reg" title="orc_x86_emit_modrm_reg ()">orc_x86_emit_modrm_reg</a>              (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-imm-reg" title="orc_x86_emit_mov_imm_reg ()">orc_x86_emit_mov_imm_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-memoffset-mmx" title="orc_x86_emit_mov_memoffset_mmx ()">orc_x86_emit_mov_memoffset_mmx</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> is_aligned</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-memoffset-reg" title="orc_x86_emit_mov_memoffset_reg ()">orc_x86_emit_mov_memoffset_reg</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-memoffset-sse" title="orc_x86_emit_mov_memoffset_sse ()">orc_x86_emit_mov_memoffset_sse</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> is_aligned</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-mmx-memoffset" title="orc_x86_emit_mov_mmx_memoffset ()">orc_x86_emit_mov_mmx_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> aligned</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> uncached</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-mmx-reg" title="orc_x86_emit_mov_mmx_reg ()">orc_x86_emit_mov_mmx_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-mmx-reg-reg" title="orc_x86_emit_mov_mmx_reg_reg ()">orc_x86_emit_mov_mmx_reg_reg</a>        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-reg-memoffset" title="orc_x86_emit_mov_reg_memoffset ()">orc_x86_emit_mov_reg_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-reg-mmx" title="orc_x86_emit_mov_reg_mmx ()">orc_x86_emit_mov_reg_mmx</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-reg-reg" title="orc_x86_emit_mov_reg_reg ()">orc_x86_emit_mov_reg_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-reg-sse" title="orc_x86_emit_mov_reg_sse ()">orc_x86_emit_mov_reg_sse</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-sse-memoffset" title="orc_x86_emit_mov_sse_memoffset ()">orc_x86_emit_mov_sse_memoffset</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> aligned</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> uncached</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-sse-reg" title="orc_x86_emit_mov_sse_reg ()">orc_x86_emit_mov_sse_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-mov-sse-reg-reg" title="orc_x86_emit_mov_sse_reg_reg ()">orc_x86_emit_mov_sse_reg_reg</a>        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-pop" title="orc_x86_emit_pop ()">orc_x86_emit_pop</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-prologue" title="orc_x86_emit_prologue ()">orc_x86_emit_prologue</a>               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-push" title="orc_x86_emit_push ()">orc_x86_emit_push</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-ret" title="orc_x86_emit_ret ()">orc_x86_emit_ret</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-rex" title="orc_x86_emit_rex ()">orc_x86_emit_rex</a>                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg3</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-sar-imm-reg" title="orc_x86_emit_sar_imm_reg ()">orc_x86_emit_sar_imm_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-sub-memoffset-reg" title="orc_x86_emit_sub_memoffset_reg ()">orc_x86_emit_sub_memoffset_reg</a>      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> destreg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-sub-reg-reg" title="orc_x86_emit_sub_reg_reg ()">orc_x86_emit_sub_reg_reg</a>            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-emit-test-reg-reg" title="orc_x86_emit_test_reg_reg ()">orc_x86_emit_test_reg_reg</a>           (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-x86.html#orc-x86-get-regname" title="orc_x86_get_regname ()">orc_x86_get_regname</a>                 (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-x86.html#orc-x86-get-regname-16" title="orc_x86_get_regname_16 ()">orc_x86_get_regname_16</a>              (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-x86.html#orc-x86-get-regname-64" title="orc_x86_get_regname_64 ()">orc_x86_get_regname_64</a>              (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-x86.html#orc-x86-get-regname-mmx" title="orc_x86_get_regname_mmx ()">orc_x86_get_regname_mmx</a>             (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-x86.html#orc-x86-get-regname-ptr" title="orc_x86_get_regname_ptr ()">orc_x86_get_regname_ptr</a>             (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> i</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="orc-x86.html#orc-x86-get-regname-sse" title="orc_x86_get_regname_sse ()">orc_x86_get_regname_sse</a>             (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+<span class="returnvalue">int</span>                 <a class="link" href="orc-x86.html#orc-x86-get-regnum" title="orc_x86_get_regnum ()">orc_x86_get_regnum</a>                  (<em class="parameter"><code><span class="type">int</span> i</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="orc-x86.html#orc-x86-do-fixups" title="orc_x86_do_fixups ()">orc_x86_do_fixups</a>                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="orc-x86.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1" title="Details">
+<a name="orc-x86.details"></a><h2>Details</h2>
+<div class="refsect2" title="orc_x86_emit_add_imm_memoffset ()">
+<a name="orc-x86-emit-add-imm-memoffset"></a><h3>orc_x86_emit_add_imm_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_add_imm_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_add_imm_reg ()">
+<a name="orc-x86-emit-add-imm-reg"></a><h3>orc_x86_emit_add_imm_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_add_imm_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="orc-Utility-functions.html#orc-bool" title="orc_bool"><span class="type">orc_bool</span></a> record</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>record</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_add_reg_memoffset ()">
+<a name="orc-x86-emit-add-reg-memoffset"></a><h3>orc_x86_emit_add_reg_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_add_reg_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_align ()">
+<a name="orc-x86-emit-align"></a><h3>orc_x86_emit_align ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_align                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_and_imm_memoffset ()">
+<a name="orc-x86-emit-and-imm-memoffset"></a><h3>orc_x86_emit_and_imm_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_and_imm_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_and_imm_reg ()">
+<a name="orc-x86-emit-and-imm-reg"></a><h3>orc_x86_emit_and_imm_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_and_imm_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_cmp_imm_memoffset ()">
+<a name="orc-x86-emit-cmp-imm-memoffset"></a><h3>orc_x86_emit_cmp_imm_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_cmp_imm_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_cmp_reg_memoffset ()">
+<a name="orc-x86-emit-cmp-reg-memoffset"></a><h3>orc_x86_emit_cmp_reg_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_cmp_reg_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_dec_memoffset ()">
+<a name="orc-x86-emit-dec-memoffset"></a><h3>orc_x86_emit_dec_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_dec_memoffset          (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_emms ()">
+<a name="orc-x86-emit-emms"></a><h3>orc_x86_emit_emms ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_emms                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_epilogue ()">
+<a name="orc-x86-emit-epilogue"></a><h3>orc_x86_emit_epilogue ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_epilogue               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_je ()">
+<a name="orc-x86-emit-je"></a><h3>orc_x86_emit_je ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_je                     (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_jle ()">
+<a name="orc-x86-emit-jle"></a><h3>orc_x86_emit_jle ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_jle                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_jmp ()">
+<a name="orc-x86-emit-jmp"></a><h3>orc_x86_emit_jmp ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_jmp                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_jne ()">
+<a name="orc-x86-emit-jne"></a><h3>orc_x86_emit_jne ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_jne                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_label ()">
+<a name="orc-x86-emit-label"></a><h3>orc_x86_emit_label ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_label                  (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> label</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_modrm_memoffset ()">
+<a name="orc-x86-emit-modrm-memoffset"></a><h3>orc_x86_emit_modrm_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_modrm_memoffset        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_modrm_reg ()">
+<a name="orc-x86-emit-modrm-reg"></a><h3>orc_x86_emit_modrm_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_modrm_reg              (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_imm_reg ()">
+<a name="orc-x86-emit-mov-imm-reg"></a><h3>orc_x86_emit_mov_imm_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_imm_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_memoffset_mmx ()">
+<a name="orc-x86-emit-mov-memoffset-mmx"></a><h3>orc_x86_emit_mov_memoffset_mmx ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_memoffset_mmx      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> is_aligned</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>is_aligned</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_memoffset_reg ()">
+<a name="orc-x86-emit-mov-memoffset-reg"></a><h3>orc_x86_emit_mov_memoffset_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_memoffset_reg      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_memoffset_sse ()">
+<a name="orc-x86-emit-mov-memoffset-sse"></a><h3>orc_x86_emit_mov_memoffset_sse ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_memoffset_sse      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> is_aligned</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>is_aligned</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_mmx_memoffset ()">
+<a name="orc-x86-emit-mov-mmx-memoffset"></a><h3>orc_x86_emit_mov_mmx_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_mmx_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> aligned</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> uncached</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>aligned</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>uncached</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_mmx_reg ()">
+<a name="orc-x86-emit-mov-mmx-reg"></a><h3>orc_x86_emit_mov_mmx_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_mmx_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_mmx_reg_reg ()">
+<a name="orc-x86-emit-mov-mmx-reg-reg"></a><h3>orc_x86_emit_mov_mmx_reg_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_mmx_reg_reg        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_reg_memoffset ()">
+<a name="orc-x86-emit-mov-reg-memoffset"></a><h3>orc_x86_emit_mov_reg_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_reg_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_reg_mmx ()">
+<a name="orc-x86-emit-mov-reg-mmx"></a><h3>orc_x86_emit_mov_reg_mmx ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_reg_mmx            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_reg_reg ()">
+<a name="orc-x86-emit-mov-reg-reg"></a><h3>orc_x86_emit_mov_reg_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_reg_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_reg_sse ()">
+<a name="orc-x86-emit-mov-reg-sse"></a><h3>orc_x86_emit_mov_reg_sse ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_reg_sse            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_sse_memoffset ()">
+<a name="orc-x86-emit-mov-sse-memoffset"></a><h3>orc_x86_emit_mov_sse_memoffset ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_sse_memoffset      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> aligned</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> uncached</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>aligned</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>uncached</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_sse_reg ()">
+<a name="orc-x86-emit-mov-sse-reg"></a><h3>orc_x86_emit_mov_sse_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_sse_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_mov_sse_reg_reg ()">
+<a name="orc-x86-emit-mov-sse-reg-reg"></a><h3>orc_x86_emit_mov_sse_reg_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_mov_sse_reg_reg        (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_pop ()">
+<a name="orc-x86-emit-pop"></a><h3>orc_x86_emit_pop ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_pop                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_prologue ()">
+<a name="orc-x86-emit-prologue"></a><h3>orc_x86_emit_prologue ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_prologue               (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_push ()">
+<a name="orc-x86-emit-push"></a><h3>orc_x86_emit_push ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_push                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_ret ()">
+<a name="orc-x86-emit-ret"></a><h3>orc_x86_emit_ret ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_ret                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_rex ()">
+<a name="orc-x86-emit-rex"></a><h3>orc_x86_emit_rex ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_rex                    (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg3</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg3</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_sar_imm_reg ()">
+<a name="orc-x86-emit-sar-imm-reg"></a><h3>orc_x86_emit_sar_imm_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_sar_imm_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> value</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_sub_memoffset_reg ()">
+<a name="orc-x86-emit-sub-memoffset-reg"></a><h3>orc_x86_emit_sub_memoffset_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_sub_memoffset_reg      (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> offset</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> destreg</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>destreg</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_sub_reg_reg ()">
+<a name="orc-x86-emit-sub-reg-reg"></a><h3>orc_x86_emit_sub_reg_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_sub_reg_reg            (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_emit_test_reg_reg ()">
+<a name="orc-x86-emit-test-reg-reg"></a><h3>orc_x86_emit_test_reg_reg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_emit_test_reg_reg           (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg1</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> reg2</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg1</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reg2</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_get_regname ()">
+<a name="orc-x86-get-regname"></a><h3>orc_x86_get_regname ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_x86_get_regname                 (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_get_regname_16 ()">
+<a name="orc-x86-get-regname-16"></a><h3>orc_x86_get_regname_16 ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_x86_get_regname_16              (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_get_regname_64 ()">
+<a name="orc-x86-get-regname-64"></a><h3>orc_x86_get_regname_64 ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_x86_get_regname_64              (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_get_regname_mmx ()">
+<a name="orc-x86-get-regname-mmx"></a><h3>orc_x86_get_regname_mmx ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_x86_get_regname_mmx             (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_get_regname_ptr ()">
+<a name="orc-x86-get-regname-ptr"></a><h3>orc_x86_get_regname_ptr ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_x86_get_regname_ptr             (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_get_regname_sse ()">
+<a name="orc-x86-get-regname-sse"></a><h3>orc_x86_get_regname_sse ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        orc_x86_get_regname_sse             (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_get_regnum ()">
+<a name="orc-x86-get-regnum"></a><h3>orc_x86_get_regnum ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>                 orc_x86_get_regnum                  (<em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="orc_x86_do_fixups ()">
+<a name="orc-x86-do-fixups"></a><h3>orc_x86_do_fixups ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                orc_x86_do_fixups                   (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>compiler</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.14</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/orc.devhelp b/doc/html/orc.devhelp
new file mode 100644 (file)
index 0000000..735ef9b
--- /dev/null
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="Orc Reference Manual" link="index.html" author="" name="orc">
+  <chapters>
+    <sub name="Overview" link="ch01.html">
+      <sub name="Building Orc and Applications That Use Orc" link="orc-building.html"/>
+      <sub name="Orc Concepts" link="orc-concepts.html"/>
+      <sub name="Orc Tutorial" link="orc-tutorial.html"/>
+    </sub>
+    <sub name="Application API" link="ch02.html">
+      <sub name="Orc" link="orc-Orc.html"/>
+      <sub name="OrcProgram" link="orc-OrcProgram.html"/>
+      <sub name="OrcCompiler" link="orc-OrcCompiler.html"/>
+      <sub name="OrcExecutor" link="orc-OrcExecutor.html"/>
+      <sub name="Orc Opcodes" link="orc-opcodes.html"/>
+    </sub>
+    <sub name="Extension API" link="ch03.html">
+      <sub name="OrcDebug" link="orc-OrcDebug.html"/>
+      <sub name="OrcOpcode" link="orc-OrcOpcode.html"/>
+      <sub name="Utility functions" link="orc-Utility-functions.html"/>
+      <sub name="OrcRule" link="orc-OrcRule.html"/>
+    </sub>
+    <sub name="Code Generation" link="ch04.html">
+      <sub name="ARM" link="orc-ARM.html"/>
+      <sub name="MMX" link="orc-MMX.html"/>
+      <sub name="PowerPC" link="orc-PowerPC.html"/>
+      <sub name="SSE" link="orc-SSE.html"/>
+      <sub name="x86" link="orc-x86.html"/>
+    </sub>
+    <sub name="Herein lie dragons" link="ch05.html">
+      <sub name="misc" link="orc-misc.html"/>
+    </sub>
+  </chapters>
+  <functions>
+    <function name="orc_init ()" link="orc-Orc.html#orc-init"/>
+    <function name="OrcProgram" link="orc-OrcProgram.html#OrcProgram"/>
+    <function name="ORC_N_CONSTANTS" link="orc-OrcProgram.html#ORC-N-CONSTANTS:CAPS"/>
+    <function name="ORC_N_RULE_SETS" link="orc-OrcProgram.html#ORC-N-RULE-SETS:CAPS"/>
+    <function name="ORC_N_TARGETS" link="orc-OrcProgram.html#ORC-N-TARGETS:CAPS"/>
+    <function name="ORC_PROGRAM_ERROR()" link="orc-OrcProgram.html#ORC-PROGRAM-ERROR:CAPS"/>
+    <function name="orc_program_new ()" link="orc-OrcProgram.html#orc-program-new"/>
+    <function name="orc_program_new_dss ()" link="orc-OrcProgram.html#orc-program-new-dss"/>
+    <function name="orc_program_new_as ()" link="orc-OrcProgram.html#orc-program-new-as"/>
+    <function name="orc_program_new_ass ()" link="orc-OrcProgram.html#orc-program-new-ass"/>
+    <function name="orc_program_new_ds ()" link="orc-OrcProgram.html#orc-program-new-ds"/>
+    <function name="orc_program_free ()" link="orc-OrcProgram.html#orc-program-free"/>
+    <function name="orc_program_get_name ()" link="orc-OrcProgram.html#orc-program-get-name"/>
+    <function name="orc_program_set_name ()" link="orc-OrcProgram.html#orc-program-set-name"/>
+    <function name="orc_program_add_temporary ()" link="orc-OrcProgram.html#orc-program-add-temporary"/>
+    <function name="orc_program_add_source ()" link="orc-OrcProgram.html#orc-program-add-source"/>
+    <function name="orc_program_add_destination ()" link="orc-OrcProgram.html#orc-program-add-destination"/>
+    <function name="orc_program_add_constant ()" link="orc-OrcProgram.html#orc-program-add-constant"/>
+    <function name="orc_program_add_accumulator ()" link="orc-OrcProgram.html#orc-program-add-accumulator"/>
+    <function name="orc_program_add_parameter ()" link="orc-OrcProgram.html#orc-program-add-parameter"/>
+    <function name="orc_program_append ()" link="orc-OrcProgram.html#orc-program-append"/>
+    <function name="orc_program_append_str ()" link="orc-OrcProgram.html#orc-program-append-str"/>
+    <function name="orc_program_append_ds ()" link="orc-OrcProgram.html#orc-program-append-ds"/>
+    <function name="orc_program_append_ds_str ()" link="orc-OrcProgram.html#orc-program-append-ds-str"/>
+    <function name="orc_program_compile ()" link="orc-OrcProgram.html#orc-program-compile"/>
+    <function name="orc_program_compile_for_target ()" link="orc-OrcProgram.html#orc-program-compile-for-target"/>
+    <function name="orc_program_compile_full ()" link="orc-OrcProgram.html#orc-program-compile-full"/>
+    <function name="orc_program_get_asm_code ()" link="orc-OrcProgram.html#orc-program-get-asm-code"/>
+    <function name="orc_program_find_var_by_name ()" link="orc-OrcProgram.html#orc-program-find-var-by-name"/>
+    <function name="orc_program_allocate_register ()" link="orc-OrcProgram.html#orc-program-allocate-register"/>
+    <function name="orc_program_dup_temporary ()" link="orc-OrcProgram.html#orc-program-dup-temporary"/>
+    <function name="enum OrcCompileResult" link="orc-OrcCompiler.html#OrcCompileResult"/>
+    <function name="OrcCompiler" link="orc-OrcCompiler.html#OrcCompiler"/>
+    <function name="OrcConstant" link="orc-OrcCompiler.html#OrcConstant"/>
+    <function name="ORC_COMPILER_ERROR()" link="orc-OrcCompiler.html#ORC-COMPILER-ERROR:CAPS"/>
+    <function name="ORC_COMPILE_RESULT_IS_FATAL()" link="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS"/>
+    <function name="ORC_COMPILE_RESULT_IS_SUCCESSFUL()" link="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS"/>
+    <function name="ORC_ASM_CODE()" link="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS"/>
+    <function name="ORC_ENABLE_ASM_CODE" link="orc-OrcCompiler.html#ORC-ENABLE-ASM-CODE:CAPS"/>
+    <function name="orc_compiler_append_code ()" link="orc-OrcCompiler.html#orc-compiler-append-code"/>
+    <function name="orc_compiler_label_new ()" link="orc-OrcCompiler.html#orc-compiler-label-new"/>
+    <function name="OrcExecutor" link="orc-OrcExecutor.html#OrcExecutor"/>
+    <function name="orc_executor_new ()" link="orc-OrcExecutor.html#orc-executor-new"/>
+    <function name="orc_executor_free ()" link="orc-OrcExecutor.html#orc-executor-free"/>
+    <function name="orc_executor_set_array ()" link="orc-OrcExecutor.html#orc-executor-set-array"/>
+    <function name="orc_executor_set_array_str ()" link="orc-OrcExecutor.html#orc-executor-set-array-str"/>
+    <function name="orc_executor_set_n ()" link="orc-OrcExecutor.html#orc-executor-set-n"/>
+    <function name="orc_executor_emulate ()" link="orc-OrcExecutor.html#orc-executor-emulate"/>
+    <function name="orc_executor_run ()" link="orc-OrcExecutor.html#orc-executor-run"/>
+    <function name="orc_executor_get_accumulator ()" link="orc-OrcExecutor.html#orc-executor-get-accumulator"/>
+    <function name="orc_executor_get_accumulator_str ()" link="orc-OrcExecutor.html#orc-executor-get-accumulator-str"/>
+    <function name="orc_executor_set_param ()" link="orc-OrcExecutor.html#orc-executor-set-param"/>
+    <function name="orc_executor_set_param_str ()" link="orc-OrcExecutor.html#orc-executor-set-param-str"/>
+    <function name="orc_executor_set_program ()" link="orc-OrcExecutor.html#orc-executor-set-program"/>
+    <function name="enum OrcDebugLevel" link="orc-OrcDebug.html#OrcDebugLevel"/>
+    <function name="OrcDebugPrintFunc ()" link="orc-OrcDebug.html#OrcDebugPrintFunc"/>
+    <function name="ORC_DEBUG_PRINT()" link="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS"/>
+    <function name="ORC_ERROR()" link="orc-OrcDebug.html#ORC-ERROR:CAPS"/>
+    <function name="ORC_WARNING()" link="orc-OrcDebug.html#ORC-WARNING:CAPS"/>
+    <function name="ORC_INFO()" link="orc-OrcDebug.html#ORC-INFO:CAPS"/>
+    <function name="ORC_DEBUG()" link="orc-OrcDebug.html#ORC-DEBUG:CAPS"/>
+    <function name="ORC_LOG()" link="orc-OrcDebug.html#ORC-LOG:CAPS"/>
+    <function name="ORC_FUNCTION" link="orc-OrcDebug.html#ORC-FUNCTION:CAPS"/>
+    <function name="orc_debug_get_level ()" link="orc-OrcDebug.html#orc-debug-get-level"/>
+    <function name="orc_debug_print ()" link="orc-OrcDebug.html#orc-debug-print"/>
+    <function name="orc_debug_set_level ()" link="orc-OrcDebug.html#orc-debug-set-level"/>
+    <function name="orc_debug_set_print_function ()" link="orc-OrcDebug.html#orc-debug-set-print-function"/>
+    <function name="OrcOpcodeEmulateFunc ()" link="orc-OrcOpcode.html#OrcOpcodeEmulateFunc"/>
+    <function name="OrcOpcodeExecutor" link="orc-OrcOpcode.html#OrcOpcodeExecutor"/>
+    <function name="OrcOpcodeSet" link="orc-OrcOpcode.html#OrcOpcodeSet"/>
+    <function name="OrcRuleSet" link="orc-OrcOpcode.html#OrcRuleSet"/>
+    <function name="OrcStaticOpcode" link="orc-OrcOpcode.html#OrcStaticOpcode"/>
+    <function name="OrcTarget" link="orc-OrcOpcode.html#OrcTarget"/>
+    <function name="ORC_OPCODE_N_ARGS" link="orc-OrcOpcode.html#ORC-OPCODE-N-ARGS:CAPS"/>
+    <function name="ORC_STATIC_OPCODE_ACCUMULATOR" link="orc-OrcOpcode.html#ORC-STATIC-OPCODE-ACCUMULATOR:CAPS"/>
+    <function name="ORC_STATIC_OPCODE_N_DEST" link="orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-DEST:CAPS"/>
+    <function name="ORC_STATIC_OPCODE_N_SRC" link="orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-SRC:CAPS"/>
+    <function name="orc_opcode_find_by_name ()" link="orc-OrcOpcode.html#orc-opcode-find-by-name"/>
+    <function name="orc_opcode_init ()" link="orc-OrcOpcode.html#orc-opcode-init"/>
+    <function name="orc_opcode_register_static ()" link="orc-OrcOpcode.html#orc-opcode-register-static"/>
+    <function name="orc_opcode_set_find_by_name ()" link="orc-OrcOpcode.html#orc-opcode-set-find-by-name"/>
+    <function name="orc_opcode_set_get ()" link="orc-OrcOpcode.html#orc-opcode-set-get"/>
+    <function name="orc_rule_set_new ()" link="orc-OrcOpcode.html#orc-rule-set-new"/>
+    <function name="orc_target_get_asm_preamble ()" link="orc-OrcOpcode.html#orc-target-get-asm-preamble"/>
+    <function name="orc_target_get_by_name ()" link="orc-OrcOpcode.html#orc-target-get-by-name"/>
+    <function name="orc_target_get_default ()" link="orc-OrcOpcode.html#orc-target-get-default"/>
+    <function name="orc_target_get_default_flags ()" link="orc-OrcOpcode.html#orc-target-get-default-flags"/>
+    <function name="orc_target_get_name ()" link="orc-OrcOpcode.html#orc-target-get-name"/>
+    <function name="orc_target_get_rule ()" link="orc-OrcOpcode.html#orc-target-get-rule"/>
+    <function name="orc_target_register ()" link="orc-OrcOpcode.html#orc-target-register"/>
+    <function name="orc_bool" link="orc-Utility-functions.html#orc-bool"/>
+    <function name="ORC_ASSERT()" link="orc-Utility-functions.html#ORC-ASSERT:CAPS"/>
+    <function name="ORC_BEGIN_DECLS" link="orc-Utility-functions.html#ORC-BEGIN-DECLS:CAPS"/>
+    <function name="ORC_CLAMP()" link="orc-Utility-functions.html#ORC-CLAMP:CAPS"/>
+    <function name="ORC_END_DECLS" link="orc-Utility-functions.html#ORC-END-DECLS:CAPS"/>
+    <function name="ORC_EXPORT" link="orc-Utility-functions.html#ORC-EXPORT:CAPS"/>
+    <function name="ORC_GNUC_PREREQ()" link="orc-Utility-functions.html#ORC-GNUC-PREREQ:CAPS"/>
+    <function name="ORC_GNU_PRINTF()" link="orc-Utility-functions.html#ORC-GNU-PRINTF:CAPS"/>
+    <function name="ORC_INTERNAL" link="orc-Utility-functions.html#ORC-INTERNAL:CAPS"/>
+    <function name="ORC_PTR_TO_INT()" link="orc-Utility-functions.html#ORC-PTR-TO-INT:CAPS"/>
+    <function name="ORC_READ_UINT32_LE()" link="orc-Utility-functions.html#ORC-READ-UINT32-LE:CAPS"/>
+    <function name="ORC_WRITE_UINT32_LE()" link="orc-Utility-functions.html#ORC-WRITE-UINT32-LE:CAPS"/>
+    <function name="orc_rule_register ()" link="orc-OrcRule.html#orc-rule-register"/>
+    <function name="enum OrcArmCond" link="orc-ARM.html#OrcArmCond"/>
+    <function name="enum OrcArmDP" link="orc-ARM.html#OrcArmDP"/>
+    <function name="enum OrcArmRegister" link="orc-ARM.html#OrcArmRegister"/>
+    <function name="orc_arm_do_fixups ()" link="orc-ARM.html#orc-arm-do-fixups"/>
+    <function name="orc_arm_emit ()" link="orc-ARM.html#orc-arm-emit"/>
+    <function name="orc_arm_emit_add ()" link="orc-ARM.html#orc-arm-emit-add"/>
+    <function name="orc_arm_emit_add_imm ()" link="orc-ARM.html#orc-arm-emit-add-imm"/>
+    <function name="orc_arm_emit_branch ()" link="orc-ARM.html#orc-arm-emit-branch"/>
+    <function name="orc_arm_emit_bx_lr ()" link="orc-ARM.html#orc-arm-emit-bx-lr"/>
+    <function name="orc_arm_emit_cmp_imm ()" link="orc-ARM.html#orc-arm-emit-cmp-imm"/>
+    <function name="orc_arm_emit_label ()" link="orc-ARM.html#orc-arm-emit-label"/>
+    <function name="orc_arm_emit_load_reg ()" link="orc-ARM.html#orc-arm-emit-load-reg"/>
+    <function name="orc_arm_emit_mov ()" link="orc-ARM.html#orc-arm-emit-mov"/>
+    <function name="orc_arm_emit_pop ()" link="orc-ARM.html#orc-arm-emit-pop"/>
+    <function name="orc_arm_emit_push ()" link="orc-ARM.html#orc-arm-emit-push"/>
+    <function name="orc_arm_emit_sub ()" link="orc-ARM.html#orc-arm-emit-sub"/>
+    <function name="orc_arm_emit_sub_imm ()" link="orc-ARM.html#orc-arm-emit-sub-imm"/>
+    <function name="orc_arm_loadw ()" link="orc-ARM.html#orc-arm-loadw"/>
+    <function name="orc_arm_reg_name ()" link="orc-ARM.html#orc-arm-reg-name"/>
+    <function name="orc_arm_storew ()" link="orc-ARM.html#orc-arm-storew"/>
+    <function name="enum OrcMMXRegister" link="orc-MMX.html#OrcMMXRegister"/>
+    <function name="enum OrcTargetMMXFlags" link="orc-MMX.html#OrcTargetMMXFlags"/>
+    <function name="ORC_MMX_SHUF()" link="orc-MMX.html#ORC-MMX-SHUF:CAPS"/>
+    <function name="orc_mmx_emit_0f ()" link="orc-MMX.html#orc-mmx-emit-0f"/>
+    <function name="orc_mmx_emit_660f ()" link="orc-MMX.html#orc-mmx-emit-660f"/>
+    <function name="orc_mmx_emit_f20f ()" link="orc-MMX.html#orc-mmx-emit-f20f"/>
+    <function name="orc_mmx_emit_f30f ()" link="orc-MMX.html#orc-mmx-emit-f30f"/>
+    <function name="orc_mmx_emit_loadib ()" link="orc-MMX.html#orc-mmx-emit-loadib"/>
+    <function name="orc_mmx_emit_loadil ()" link="orc-MMX.html#orc-mmx-emit-loadil"/>
+    <function name="orc_mmx_emit_loadiw ()" link="orc-MMX.html#orc-mmx-emit-loadiw"/>
+    <function name="orc_mmx_emit_loadpb ()" link="orc-MMX.html#orc-mmx-emit-loadpb"/>
+    <function name="orc_mmx_emit_loadpl ()" link="orc-MMX.html#orc-mmx-emit-loadpl"/>
+    <function name="orc_mmx_emit_loadpq ()" link="orc-MMX.html#orc-mmx-emit-loadpq"/>
+    <function name="orc_mmx_emit_loadpw ()" link="orc-MMX.html#orc-mmx-emit-loadpw"/>
+    <function name="orc_mmx_emit_pshufw ()" link="orc-MMX.html#orc-mmx-emit-pshufw"/>
+    <function name="orc_mmx_emit_shiftimm ()" link="orc-MMX.html#orc-mmx-emit-shiftimm"/>
+    <function name="orc_mmx_get_cpu_flags ()" link="orc-MMX.html#orc-mmx-get-cpu-flags"/>
+    <function name="orc_mmx_init ()" link="orc-MMX.html#orc-mmx-init"/>
+    <function name="powerpc_get_regname ()" link="orc-PowerPC.html#powerpc-get-regname"/>
+    <function name="powerpc_regnum ()" link="orc-PowerPC.html#powerpc-regnum"/>
+    <function name="powerpc_add_fixup ()" link="orc-PowerPC.html#powerpc-add-fixup"/>
+    <function name="powerpc_do_fixups ()" link="orc-PowerPC.html#powerpc-do-fixups"/>
+    <function name="powerpc_emit ()" link="orc-PowerPC.html#powerpc-emit"/>
+    <function name="powerpc_emit_655510 ()" link="orc-PowerPC.html#powerpc-emit-655510"/>
+    <function name="powerpc_emit_VA ()" link="orc-PowerPC.html#powerpc-emit-VA"/>
+    <function name="powerpc_emit_VX ()" link="orc-PowerPC.html#powerpc-emit-VX"/>
+    <function name="powerpc_emit_VX_2 ()" link="orc-PowerPC.html#powerpc-emit-VX-2"/>
+    <function name="powerpc_emit_X ()" link="orc-PowerPC.html#powerpc-emit-X"/>
+    <function name="powerpc_emit_addi ()" link="orc-PowerPC.html#powerpc-emit-addi"/>
+    <function name="powerpc_emit_b ()" link="orc-PowerPC.html#powerpc-emit-b"/>
+    <function name="powerpc_emit_beq ()" link="orc-PowerPC.html#powerpc-emit-beq"/>
+    <function name="powerpc_emit_bne ()" link="orc-PowerPC.html#powerpc-emit-bne"/>
+    <function name="powerpc_emit_label ()" link="orc-PowerPC.html#powerpc-emit-label"/>
+    <function name="powerpc_emit_lwz ()" link="orc-PowerPC.html#powerpc-emit-lwz"/>
+    <function name="powerpc_emit_ret ()" link="orc-PowerPC.html#powerpc-emit-ret"/>
+    <function name="powerpc_emit_srawi ()" link="orc-PowerPC.html#powerpc-emit-srawi"/>
+    <function name="powerpc_emit_stwu ()" link="orc-PowerPC.html#powerpc-emit-stwu"/>
+    <function name="powerpc_get_constant ()" link="orc-PowerPC.html#powerpc-get-constant"/>
+    <function name="enum OrcSSERegister" link="orc-SSE.html#OrcSSERegister"/>
+    <function name="enum OrcTargetSSEFlags" link="orc-SSE.html#OrcTargetSSEFlags"/>
+    <function name="ORC_SSE_SHUF()" link="orc-SSE.html#ORC-SSE-SHUF:CAPS"/>
+    <function name="orc_sse_emit_0f ()" link="orc-SSE.html#orc-sse-emit-0f"/>
+    <function name="orc_sse_emit_660f ()" link="orc-SSE.html#orc-sse-emit-660f"/>
+    <function name="orc_sse_emit_f20f ()" link="orc-SSE.html#orc-sse-emit-f20f"/>
+    <function name="orc_sse_emit_f30f ()" link="orc-SSE.html#orc-sse-emit-f30f"/>
+    <function name="orc_sse_emit_loadib ()" link="orc-SSE.html#orc-sse-emit-loadib"/>
+    <function name="orc_sse_emit_loadil ()" link="orc-SSE.html#orc-sse-emit-loadil"/>
+    <function name="orc_sse_emit_loadiw ()" link="orc-SSE.html#orc-sse-emit-loadiw"/>
+    <function name="orc_sse_emit_loadpb ()" link="orc-SSE.html#orc-sse-emit-loadpb"/>
+    <function name="orc_sse_emit_loadpl ()" link="orc-SSE.html#orc-sse-emit-loadpl"/>
+    <function name="orc_sse_emit_loadpq ()" link="orc-SSE.html#orc-sse-emit-loadpq"/>
+    <function name="orc_sse_emit_loadpw ()" link="orc-SSE.html#orc-sse-emit-loadpw"/>
+    <function name="orc_sse_emit_pshufd ()" link="orc-SSE.html#orc-sse-emit-pshufd"/>
+    <function name="orc_sse_emit_pshuflw ()" link="orc-SSE.html#orc-sse-emit-pshuflw"/>
+    <function name="orc_sse_emit_shiftimm ()" link="orc-SSE.html#orc-sse-emit-shiftimm"/>
+    <function name="orc_sse_get_cpu_flags ()" link="orc-SSE.html#orc-sse-get-cpu-flags"/>
+    <function name="orc_sse_init ()" link="orc-SSE.html#orc-sse-init"/>
+    <function name="orc_x86_emit_add_imm_memoffset ()" link="orc-x86.html#orc-x86-emit-add-imm-memoffset"/>
+    <function name="orc_x86_emit_add_imm_reg ()" link="orc-x86.html#orc-x86-emit-add-imm-reg"/>
+    <function name="orc_x86_emit_add_reg_memoffset ()" link="orc-x86.html#orc-x86-emit-add-reg-memoffset"/>
+    <function name="orc_x86_emit_align ()" link="orc-x86.html#orc-x86-emit-align"/>
+    <function name="orc_x86_emit_and_imm_memoffset ()" link="orc-x86.html#orc-x86-emit-and-imm-memoffset"/>
+    <function name="orc_x86_emit_and_imm_reg ()" link="orc-x86.html#orc-x86-emit-and-imm-reg"/>
+    <function name="orc_x86_emit_cmp_imm_memoffset ()" link="orc-x86.html#orc-x86-emit-cmp-imm-memoffset"/>
+    <function name="orc_x86_emit_cmp_reg_memoffset ()" link="orc-x86.html#orc-x86-emit-cmp-reg-memoffset"/>
+    <function name="orc_x86_emit_dec_memoffset ()" link="orc-x86.html#orc-x86-emit-dec-memoffset"/>
+    <function name="orc_x86_emit_emms ()" link="orc-x86.html#orc-x86-emit-emms"/>
+    <function name="orc_x86_emit_epilogue ()" link="orc-x86.html#orc-x86-emit-epilogue"/>
+    <function name="orc_x86_emit_je ()" link="orc-x86.html#orc-x86-emit-je"/>
+    <function name="orc_x86_emit_jle ()" link="orc-x86.html#orc-x86-emit-jle"/>
+    <function name="orc_x86_emit_jmp ()" link="orc-x86.html#orc-x86-emit-jmp"/>
+    <function name="orc_x86_emit_jne ()" link="orc-x86.html#orc-x86-emit-jne"/>
+    <function name="orc_x86_emit_label ()" link="orc-x86.html#orc-x86-emit-label"/>
+    <function name="orc_x86_emit_modrm_memoffset ()" link="orc-x86.html#orc-x86-emit-modrm-memoffset"/>
+    <function name="orc_x86_emit_modrm_reg ()" link="orc-x86.html#orc-x86-emit-modrm-reg"/>
+    <function name="orc_x86_emit_mov_imm_reg ()" link="orc-x86.html#orc-x86-emit-mov-imm-reg"/>
+    <function name="orc_x86_emit_mov_memoffset_mmx ()" link="orc-x86.html#orc-x86-emit-mov-memoffset-mmx"/>
+    <function name="orc_x86_emit_mov_memoffset_reg ()" link="orc-x86.html#orc-x86-emit-mov-memoffset-reg"/>
+    <function name="orc_x86_emit_mov_memoffset_sse ()" link="orc-x86.html#orc-x86-emit-mov-memoffset-sse"/>
+    <function name="orc_x86_emit_mov_mmx_memoffset ()" link="orc-x86.html#orc-x86-emit-mov-mmx-memoffset"/>
+    <function name="orc_x86_emit_mov_mmx_reg ()" link="orc-x86.html#orc-x86-emit-mov-mmx-reg"/>
+    <function name="orc_x86_emit_mov_mmx_reg_reg ()" link="orc-x86.html#orc-x86-emit-mov-mmx-reg-reg"/>
+    <function name="orc_x86_emit_mov_reg_memoffset ()" link="orc-x86.html#orc-x86-emit-mov-reg-memoffset"/>
+    <function name="orc_x86_emit_mov_reg_mmx ()" link="orc-x86.html#orc-x86-emit-mov-reg-mmx"/>
+    <function name="orc_x86_emit_mov_reg_reg ()" link="orc-x86.html#orc-x86-emit-mov-reg-reg"/>
+    <function name="orc_x86_emit_mov_reg_sse ()" link="orc-x86.html#orc-x86-emit-mov-reg-sse"/>
+    <function name="orc_x86_emit_mov_sse_memoffset ()" link="orc-x86.html#orc-x86-emit-mov-sse-memoffset"/>
+    <function name="orc_x86_emit_mov_sse_reg ()" link="orc-x86.html#orc-x86-emit-mov-sse-reg"/>
+    <function name="orc_x86_emit_mov_sse_reg_reg ()" link="orc-x86.html#orc-x86-emit-mov-sse-reg-reg"/>
+    <function name="orc_x86_emit_pop ()" link="orc-x86.html#orc-x86-emit-pop"/>
+    <function name="orc_x86_emit_prologue ()" link="orc-x86.html#orc-x86-emit-prologue"/>
+    <function name="orc_x86_emit_push ()" link="orc-x86.html#orc-x86-emit-push"/>
+    <function name="orc_x86_emit_ret ()" link="orc-x86.html#orc-x86-emit-ret"/>
+    <function name="orc_x86_emit_rex ()" link="orc-x86.html#orc-x86-emit-rex"/>
+    <function name="orc_x86_emit_sar_imm_reg ()" link="orc-x86.html#orc-x86-emit-sar-imm-reg"/>
+    <function name="orc_x86_emit_sub_memoffset_reg ()" link="orc-x86.html#orc-x86-emit-sub-memoffset-reg"/>
+    <function name="orc_x86_emit_sub_reg_reg ()" link="orc-x86.html#orc-x86-emit-sub-reg-reg"/>
+    <function name="orc_x86_emit_test_reg_reg ()" link="orc-x86.html#orc-x86-emit-test-reg-reg"/>
+    <function name="orc_x86_get_regname ()" link="orc-x86.html#orc-x86-get-regname"/>
+    <function name="orc_x86_get_regname_16 ()" link="orc-x86.html#orc-x86-get-regname-16"/>
+    <function name="orc_x86_get_regname_64 ()" link="orc-x86.html#orc-x86-get-regname-64"/>
+    <function name="orc_x86_get_regname_mmx ()" link="orc-x86.html#orc-x86-get-regname-mmx"/>
+    <function name="orc_x86_get_regname_ptr ()" link="orc-x86.html#orc-x86-get-regname-ptr"/>
+    <function name="orc_x86_get_regname_sse ()" link="orc-x86.html#orc-x86-get-regname-sse"/>
+    <function name="orc_x86_get_regnum ()" link="orc-x86.html#orc-x86-get-regnum"/>
+    <function name="orc_x86_do_fixups ()" link="orc-x86.html#orc-x86-do-fixups"/>
+    <function name="OrcVariable" link="orc-misc.html#OrcVariable"/>
+    <function name="OrcInstruction" link="orc-misc.html#OrcInstruction"/>
+    <function name="OrcRule" link="orc-misc.html#OrcRule"/>
+    <function name="OrcFixup" link="orc-misc.html#OrcFixup"/>
+    <function name="OrcRuleEmitFunc ()" link="orc-misc.html#OrcRuleEmitFunc"/>
+    <function name="ORC_N_REGS" link="orc-misc.html#ORC-N-REGS:CAPS"/>
+    <function name="ORC_N_INSNS" link="orc-misc.html#ORC-N-INSNS:CAPS"/>
+    <function name="ORC_N_VARIABLES" link="orc-misc.html#ORC-N-VARIABLES:CAPS"/>
+    <function name="ORC_N_REGISTERS" link="orc-misc.html#ORC-N-REGISTERS:CAPS"/>
+    <function name="ORC_N_FIXUPS" link="orc-misc.html#ORC-N-FIXUPS:CAPS"/>
+    <function name="ORC_N_LABELS" link="orc-misc.html#ORC-N-LABELS:CAPS"/>
+    <function name="ORC_GP_REG_BASE" link="orc-misc.html#ORC-GP-REG-BASE:CAPS"/>
+    <function name="ORC_VEC_REG_BASE" link="orc-misc.html#ORC-VEC-REG-BASE:CAPS"/>
+    <function name="ORC_STRUCT_OFFSET()" link="orc-misc.html#ORC-STRUCT-OFFSET:CAPS"/>
+    <function name="enum OrcVarType" link="orc-misc.html#OrcVarType"/>
+    <function name="orc_powerpc_init ()" link="orc-misc.html#orc-powerpc-init"/>
+    <function name="orc_arm_init ()" link="orc-misc.html#orc-arm-init"/>
+    <function name="orc_c_init ()" link="orc-misc.html#orc-c-init"/>
+    <function name="orc_parse ()" link="orc-misc.html#orc-parse"/>
+    <function name="ARRAY_SIZE()" link="orc-misc.html#ARRAY-SIZE:CAPS"/>
+    <function name="MAX()" link="orc-misc.html#MAX:CAPS"/>
+    <function name="MIN()" link="orc-misc.html#MIN:CAPS"/>
+    <function name="get_cpuinfo_line ()" link="orc-misc.html#get-cpuinfo-line"/>
+    <function name="get_file ()" link="orc-misc.html#get-file"/>
+    <function name="get_file_int ()" link="orc-misc.html#get-file-int"/>
+    <function name="get_tag_value ()" link="orc-misc.html#get-tag-value"/>
+    <function name="strsplit ()" link="orc-misc.html#strsplit"/>
+  </functions>
+</book>
diff --git a/doc/html/orc.devhelp2 b/doc/html/orc.devhelp2
new file mode 100644 (file)
index 0000000..a8b9fab
--- /dev/null
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="Orc Reference Manual" link="index.html" author="" name="orc" version="2" language="c">
+  <chapters>
+    <sub name="Overview" link="ch01.html">
+      <sub name="Building Orc and Applications That Use Orc" link="orc-building.html"/>
+      <sub name="Orc Concepts" link="orc-concepts.html"/>
+      <sub name="Orc Tutorial" link="orc-tutorial.html"/>
+    </sub>
+    <sub name="Application API" link="ch02.html">
+      <sub name="Orc" link="orc-Orc.html"/>
+      <sub name="OrcProgram" link="orc-OrcProgram.html"/>
+      <sub name="OrcCompiler" link="orc-OrcCompiler.html"/>
+      <sub name="OrcExecutor" link="orc-OrcExecutor.html"/>
+      <sub name="Orc Opcodes" link="orc-opcodes.html"/>
+    </sub>
+    <sub name="Extension API" link="ch03.html">
+      <sub name="OrcDebug" link="orc-OrcDebug.html"/>
+      <sub name="OrcOpcode" link="orc-OrcOpcode.html"/>
+      <sub name="Utility functions" link="orc-Utility-functions.html"/>
+      <sub name="OrcRule" link="orc-OrcRule.html"/>
+    </sub>
+    <sub name="Code Generation" link="ch04.html">
+      <sub name="ARM" link="orc-ARM.html"/>
+      <sub name="MMX" link="orc-MMX.html"/>
+      <sub name="PowerPC" link="orc-PowerPC.html"/>
+      <sub name="SSE" link="orc-SSE.html"/>
+      <sub name="x86" link="orc-x86.html"/>
+    </sub>
+    <sub name="Herein lie dragons" link="ch05.html">
+      <sub name="misc" link="orc-misc.html"/>
+    </sub>
+  </chapters>
+  <functions>
+    <keyword type="function" name="orc_init ()" link="orc-Orc.html#orc-init"/>
+    <keyword type="struct" name="OrcProgram" link="orc-OrcProgram.html#OrcProgram"/>
+    <keyword type="macro" name="ORC_N_CONSTANTS" link="orc-OrcProgram.html#ORC-N-CONSTANTS:CAPS"/>
+    <keyword type="macro" name="ORC_N_RULE_SETS" link="orc-OrcProgram.html#ORC-N-RULE-SETS:CAPS"/>
+    <keyword type="macro" name="ORC_N_TARGETS" link="orc-OrcProgram.html#ORC-N-TARGETS:CAPS"/>
+    <keyword type="macro" name="ORC_PROGRAM_ERROR()" link="orc-OrcProgram.html#ORC-PROGRAM-ERROR:CAPS"/>
+    <keyword type="function" name="orc_program_new ()" link="orc-OrcProgram.html#orc-program-new"/>
+    <keyword type="function" name="orc_program_new_dss ()" link="orc-OrcProgram.html#orc-program-new-dss"/>
+    <keyword type="function" name="orc_program_new_as ()" link="orc-OrcProgram.html#orc-program-new-as"/>
+    <keyword type="function" name="orc_program_new_ass ()" link="orc-OrcProgram.html#orc-program-new-ass"/>
+    <keyword type="function" name="orc_program_new_ds ()" link="orc-OrcProgram.html#orc-program-new-ds"/>
+    <keyword type="function" name="orc_program_free ()" link="orc-OrcProgram.html#orc-program-free"/>
+    <keyword type="function" name="orc_program_get_name ()" link="orc-OrcProgram.html#orc-program-get-name"/>
+    <keyword type="function" name="orc_program_set_name ()" link="orc-OrcProgram.html#orc-program-set-name"/>
+    <keyword type="function" name="orc_program_add_temporary ()" link="orc-OrcProgram.html#orc-program-add-temporary"/>
+    <keyword type="function" name="orc_program_add_source ()" link="orc-OrcProgram.html#orc-program-add-source"/>
+    <keyword type="function" name="orc_program_add_destination ()" link="orc-OrcProgram.html#orc-program-add-destination"/>
+    <keyword type="function" name="orc_program_add_constant ()" link="orc-OrcProgram.html#orc-program-add-constant"/>
+    <keyword type="function" name="orc_program_add_accumulator ()" link="orc-OrcProgram.html#orc-program-add-accumulator"/>
+    <keyword type="function" name="orc_program_add_parameter ()" link="orc-OrcProgram.html#orc-program-add-parameter"/>
+    <keyword type="function" name="orc_program_append ()" link="orc-OrcProgram.html#orc-program-append"/>
+    <keyword type="function" name="orc_program_append_str ()" link="orc-OrcProgram.html#orc-program-append-str"/>
+    <keyword type="function" name="orc_program_append_ds ()" link="orc-OrcProgram.html#orc-program-append-ds"/>
+    <keyword type="function" name="orc_program_append_ds_str ()" link="orc-OrcProgram.html#orc-program-append-ds-str"/>
+    <keyword type="function" name="orc_program_compile ()" link="orc-OrcProgram.html#orc-program-compile"/>
+    <keyword type="function" name="orc_program_compile_for_target ()" link="orc-OrcProgram.html#orc-program-compile-for-target"/>
+    <keyword type="function" name="orc_program_compile_full ()" link="orc-OrcProgram.html#orc-program-compile-full"/>
+    <keyword type="function" name="orc_program_get_asm_code ()" link="orc-OrcProgram.html#orc-program-get-asm-code"/>
+    <keyword type="function" name="orc_program_find_var_by_name ()" link="orc-OrcProgram.html#orc-program-find-var-by-name"/>
+    <keyword type="function" name="orc_program_allocate_register ()" link="orc-OrcProgram.html#orc-program-allocate-register"/>
+    <keyword type="function" name="orc_program_dup_temporary ()" link="orc-OrcProgram.html#orc-program-dup-temporary"/>
+    <keyword type="enum" name="enum OrcCompileResult" link="orc-OrcCompiler.html#OrcCompileResult"/>
+    <keyword type="struct" name="OrcCompiler" link="orc-OrcCompiler.html#OrcCompiler"/>
+    <keyword type="struct" name="OrcConstant" link="orc-OrcCompiler.html#OrcConstant"/>
+    <keyword type="macro" name="ORC_COMPILER_ERROR()" link="orc-OrcCompiler.html#ORC-COMPILER-ERROR:CAPS"/>
+    <keyword type="macro" name="ORC_COMPILE_RESULT_IS_FATAL()" link="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS"/>
+    <keyword type="macro" name="ORC_COMPILE_RESULT_IS_SUCCESSFUL()" link="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS"/>
+    <keyword type="macro" name="ORC_ASM_CODE()" link="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS"/>
+    <keyword type="macro" name="ORC_ENABLE_ASM_CODE" link="orc-OrcCompiler.html#ORC-ENABLE-ASM-CODE:CAPS"/>
+    <keyword type="function" name="orc_compiler_append_code ()" link="orc-OrcCompiler.html#orc-compiler-append-code"/>
+    <keyword type="function" name="orc_compiler_label_new ()" link="orc-OrcCompiler.html#orc-compiler-label-new"/>
+    <keyword type="struct" name="OrcExecutor" link="orc-OrcExecutor.html#OrcExecutor"/>
+    <keyword type="function" name="orc_executor_new ()" link="orc-OrcExecutor.html#orc-executor-new"/>
+    <keyword type="function" name="orc_executor_free ()" link="orc-OrcExecutor.html#orc-executor-free"/>
+    <keyword type="function" name="orc_executor_set_array ()" link="orc-OrcExecutor.html#orc-executor-set-array"/>
+    <keyword type="function" name="orc_executor_set_array_str ()" link="orc-OrcExecutor.html#orc-executor-set-array-str"/>
+    <keyword type="function" name="orc_executor_set_n ()" link="orc-OrcExecutor.html#orc-executor-set-n"/>
+    <keyword type="function" name="orc_executor_emulate ()" link="orc-OrcExecutor.html#orc-executor-emulate"/>
+    <keyword type="function" name="orc_executor_run ()" link="orc-OrcExecutor.html#orc-executor-run"/>
+    <keyword type="function" name="orc_executor_get_accumulator ()" link="orc-OrcExecutor.html#orc-executor-get-accumulator"/>
+    <keyword type="function" name="orc_executor_get_accumulator_str ()" link="orc-OrcExecutor.html#orc-executor-get-accumulator-str"/>
+    <keyword type="function" name="orc_executor_set_param ()" link="orc-OrcExecutor.html#orc-executor-set-param"/>
+    <keyword type="function" name="orc_executor_set_param_str ()" link="orc-OrcExecutor.html#orc-executor-set-param-str"/>
+    <keyword type="function" name="orc_executor_set_program ()" link="orc-OrcExecutor.html#orc-executor-set-program"/>
+    <keyword type="enum" name="enum OrcDebugLevel" link="orc-OrcDebug.html#OrcDebugLevel"/>
+    <keyword type="function" name="OrcDebugPrintFunc ()" link="orc-OrcDebug.html#OrcDebugPrintFunc"/>
+    <keyword type="macro" name="ORC_DEBUG_PRINT()" link="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS"/>
+    <keyword type="macro" name="ORC_ERROR()" link="orc-OrcDebug.html#ORC-ERROR:CAPS"/>
+    <keyword type="macro" name="ORC_WARNING()" link="orc-OrcDebug.html#ORC-WARNING:CAPS"/>
+    <keyword type="macro" name="ORC_INFO()" link="orc-OrcDebug.html#ORC-INFO:CAPS"/>
+    <keyword type="macro" name="ORC_DEBUG()" link="orc-OrcDebug.html#ORC-DEBUG:CAPS"/>
+    <keyword type="macro" name="ORC_LOG()" link="orc-OrcDebug.html#ORC-LOG:CAPS"/>
+    <keyword type="macro" name="ORC_FUNCTION" link="orc-OrcDebug.html#ORC-FUNCTION:CAPS"/>
+    <keyword type="function" name="orc_debug_get_level ()" link="orc-OrcDebug.html#orc-debug-get-level"/>
+    <keyword type="function" name="orc_debug_print ()" link="orc-OrcDebug.html#orc-debug-print"/>
+    <keyword type="function" name="orc_debug_set_level ()" link="orc-OrcDebug.html#orc-debug-set-level"/>
+    <keyword type="function" name="orc_debug_set_print_function ()" link="orc-OrcDebug.html#orc-debug-set-print-function"/>
+    <keyword type="function" name="OrcOpcodeEmulateFunc ()" link="orc-OrcOpcode.html#OrcOpcodeEmulateFunc"/>
+    <keyword type="struct" name="OrcOpcodeExecutor" link="orc-OrcOpcode.html#OrcOpcodeExecutor"/>
+    <keyword type="struct" name="OrcOpcodeSet" link="orc-OrcOpcode.html#OrcOpcodeSet"/>
+    <keyword type="struct" name="OrcRuleSet" link="orc-OrcOpcode.html#OrcRuleSet"/>
+    <keyword type="struct" name="OrcStaticOpcode" link="orc-OrcOpcode.html#OrcStaticOpcode"/>
+    <keyword type="struct" name="OrcTarget" link="orc-OrcOpcode.html#OrcTarget"/>
+    <keyword type="macro" name="ORC_OPCODE_N_ARGS" link="orc-OrcOpcode.html#ORC-OPCODE-N-ARGS:CAPS"/>
+    <keyword type="macro" name="ORC_STATIC_OPCODE_ACCUMULATOR" link="orc-OrcOpcode.html#ORC-STATIC-OPCODE-ACCUMULATOR:CAPS"/>
+    <keyword type="macro" name="ORC_STATIC_OPCODE_N_DEST" link="orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-DEST:CAPS"/>
+    <keyword type="macro" name="ORC_STATIC_OPCODE_N_SRC" link="orc-OrcOpcode.html#ORC-STATIC-OPCODE-N-SRC:CAPS"/>
+    <keyword type="function" name="orc_opcode_find_by_name ()" link="orc-OrcOpcode.html#orc-opcode-find-by-name"/>
+    <keyword type="function" name="orc_opcode_init ()" link="orc-OrcOpcode.html#orc-opcode-init"/>
+    <keyword type="function" name="orc_opcode_register_static ()" link="orc-OrcOpcode.html#orc-opcode-register-static"/>
+    <keyword type="function" name="orc_opcode_set_find_by_name ()" link="orc-OrcOpcode.html#orc-opcode-set-find-by-name"/>
+    <keyword type="function" name="orc_opcode_set_get ()" link="orc-OrcOpcode.html#orc-opcode-set-get"/>
+    <keyword type="function" name="orc_rule_set_new ()" link="orc-OrcOpcode.html#orc-rule-set-new"/>
+    <keyword type="function" name="orc_target_get_asm_preamble ()" link="orc-OrcOpcode.html#orc-target-get-asm-preamble"/>
+    <keyword type="function" name="orc_target_get_by_name ()" link="orc-OrcOpcode.html#orc-target-get-by-name"/>
+    <keyword type="function" name="orc_target_get_default ()" link="orc-OrcOpcode.html#orc-target-get-default"/>
+    <keyword type="function" name="orc_target_get_default_flags ()" link="orc-OrcOpcode.html#orc-target-get-default-flags"/>
+    <keyword type="function" name="orc_target_get_name ()" link="orc-OrcOpcode.html#orc-target-get-name"/>
+    <keyword type="function" name="orc_target_get_rule ()" link="orc-OrcOpcode.html#orc-target-get-rule"/>
+    <keyword type="function" name="orc_target_register ()" link="orc-OrcOpcode.html#orc-target-register"/>
+    <keyword type="typedef" name="orc_bool" link="orc-Utility-functions.html#orc-bool"/>
+    <keyword type="macro" name="ORC_ASSERT()" link="orc-Utility-functions.html#ORC-ASSERT:CAPS"/>
+    <keyword type="macro" name="ORC_BEGIN_DECLS" link="orc-Utility-functions.html#ORC-BEGIN-DECLS:CAPS"/>
+    <keyword type="macro" name="ORC_CLAMP()" link="orc-Utility-functions.html#ORC-CLAMP:CAPS"/>
+    <keyword type="macro" name="ORC_END_DECLS" link="orc-Utility-functions.html#ORC-END-DECLS:CAPS"/>
+    <keyword type="macro" name="ORC_EXPORT" link="orc-Utility-functions.html#ORC-EXPORT:CAPS"/>
+    <keyword type="macro" name="ORC_GNUC_PREREQ()" link="orc-Utility-functions.html#ORC-GNUC-PREREQ:CAPS"/>
+    <keyword type="macro" name="ORC_GNU_PRINTF()" link="orc-Utility-functions.html#ORC-GNU-PRINTF:CAPS"/>
+    <keyword type="macro" name="ORC_INTERNAL" link="orc-Utility-functions.html#ORC-INTERNAL:CAPS"/>
+    <keyword type="macro" name="ORC_PTR_TO_INT()" link="orc-Utility-functions.html#ORC-PTR-TO-INT:CAPS"/>
+    <keyword type="macro" name="ORC_READ_UINT32_LE()" link="orc-Utility-functions.html#ORC-READ-UINT32-LE:CAPS"/>
+    <keyword type="macro" name="ORC_WRITE_UINT32_LE()" link="orc-Utility-functions.html#ORC-WRITE-UINT32-LE:CAPS"/>
+    <keyword type="function" name="orc_rule_register ()" link="orc-OrcRule.html#orc-rule-register"/>
+    <keyword type="enum" name="enum OrcArmCond" link="orc-ARM.html#OrcArmCond"/>
+    <keyword type="enum" name="enum OrcArmDP" link="orc-ARM.html#OrcArmDP"/>
+    <keyword type="enum" name="enum OrcArmRegister" link="orc-ARM.html#OrcArmRegister"/>
+    <keyword type="function" name="orc_arm_do_fixups ()" link="orc-ARM.html#orc-arm-do-fixups"/>
+    <keyword type="function" name="orc_arm_emit ()" link="orc-ARM.html#orc-arm-emit"/>
+    <keyword type="function" name="orc_arm_emit_add ()" link="orc-ARM.html#orc-arm-emit-add"/>
+    <keyword type="function" name="orc_arm_emit_add_imm ()" link="orc-ARM.html#orc-arm-emit-add-imm"/>
+    <keyword type="function" name="orc_arm_emit_branch ()" link="orc-ARM.html#orc-arm-emit-branch"/>
+    <keyword type="function" name="orc_arm_emit_bx_lr ()" link="orc-ARM.html#orc-arm-emit-bx-lr"/>
+    <keyword type="function" name="orc_arm_emit_cmp_imm ()" link="orc-ARM.html#orc-arm-emit-cmp-imm"/>
+    <keyword type="function" name="orc_arm_emit_label ()" link="orc-ARM.html#orc-arm-emit-label"/>
+    <keyword type="function" name="orc_arm_emit_load_reg ()" link="orc-ARM.html#orc-arm-emit-load-reg"/>
+    <keyword type="function" name="orc_arm_emit_mov ()" link="orc-ARM.html#orc-arm-emit-mov"/>
+    <keyword type="function" name="orc_arm_emit_pop ()" link="orc-ARM.html#orc-arm-emit-pop"/>
+    <keyword type="function" name="orc_arm_emit_push ()" link="orc-ARM.html#orc-arm-emit-push"/>
+    <keyword type="function" name="orc_arm_emit_sub ()" link="orc-ARM.html#orc-arm-emit-sub"/>
+    <keyword type="function" name="orc_arm_emit_sub_imm ()" link="orc-ARM.html#orc-arm-emit-sub-imm"/>
+    <keyword type="function" name="orc_arm_loadw ()" link="orc-ARM.html#orc-arm-loadw"/>
+    <keyword type="function" name="orc_arm_reg_name ()" link="orc-ARM.html#orc-arm-reg-name"/>
+    <keyword type="function" name="orc_arm_storew ()" link="orc-ARM.html#orc-arm-storew"/>
+    <keyword type="enum" name="enum OrcMMXRegister" link="orc-MMX.html#OrcMMXRegister"/>
+    <keyword type="enum" name="enum OrcTargetMMXFlags" link="orc-MMX.html#OrcTargetMMXFlags"/>
+    <keyword type="macro" name="ORC_MMX_SHUF()" link="orc-MMX.html#ORC-MMX-SHUF:CAPS"/>
+    <keyword type="function" name="orc_mmx_emit_0f ()" link="orc-MMX.html#orc-mmx-emit-0f"/>
+    <keyword type="function" name="orc_mmx_emit_660f ()" link="orc-MMX.html#orc-mmx-emit-660f"/>
+    <keyword type="function" name="orc_mmx_emit_f20f ()" link="orc-MMX.html#orc-mmx-emit-f20f"/>
+    <keyword type="function" name="orc_mmx_emit_f30f ()" link="orc-MMX.html#orc-mmx-emit-f30f"/>
+    <keyword type="function" name="orc_mmx_emit_loadib ()" link="orc-MMX.html#orc-mmx-emit-loadib"/>
+    <keyword type="function" name="orc_mmx_emit_loadil ()" link="orc-MMX.html#orc-mmx-emit-loadil"/>
+    <keyword type="function" name="orc_mmx_emit_loadiw ()" link="orc-MMX.html#orc-mmx-emit-loadiw"/>
+    <keyword type="function" name="orc_mmx_emit_loadpb ()" link="orc-MMX.html#orc-mmx-emit-loadpb"/>
+    <keyword type="function" name="orc_mmx_emit_loadpl ()" link="orc-MMX.html#orc-mmx-emit-loadpl"/>
+    <keyword type="function" name="orc_mmx_emit_loadpq ()" link="orc-MMX.html#orc-mmx-emit-loadpq"/>
+    <keyword type="function" name="orc_mmx_emit_loadpw ()" link="orc-MMX.html#orc-mmx-emit-loadpw"/>
+    <keyword type="function" name="orc_mmx_emit_pshufw ()" link="orc-MMX.html#orc-mmx-emit-pshufw"/>
+    <keyword type="function" name="orc_mmx_emit_shiftimm ()" link="orc-MMX.html#orc-mmx-emit-shiftimm"/>
+    <keyword type="function" name="orc_mmx_get_cpu_flags ()" link="orc-MMX.html#orc-mmx-get-cpu-flags"/>
+    <keyword type="function" name="orc_mmx_init ()" link="orc-MMX.html#orc-mmx-init"/>
+    <keyword type="function" name="powerpc_get_regname ()" link="orc-PowerPC.html#powerpc-get-regname"/>
+    <keyword type="function" name="powerpc_regnum ()" link="orc-PowerPC.html#powerpc-regnum"/>
+    <keyword type="function" name="powerpc_add_fixup ()" link="orc-PowerPC.html#powerpc-add-fixup"/>
+    <keyword type="function" name="powerpc_do_fixups ()" link="orc-PowerPC.html#powerpc-do-fixups"/>
+    <keyword type="function" name="powerpc_emit ()" link="orc-PowerPC.html#powerpc-emit"/>
+    <keyword type="function" name="powerpc_emit_655510 ()" link="orc-PowerPC.html#powerpc-emit-655510"/>
+    <keyword type="function" name="powerpc_emit_VA ()" link="orc-PowerPC.html#powerpc-emit-VA"/>
+    <keyword type="function" name="powerpc_emit_VX ()" link="orc-PowerPC.html#powerpc-emit-VX"/>
+    <keyword type="function" name="powerpc_emit_VX_2 ()" link="orc-PowerPC.html#powerpc-emit-VX-2"/>
+    <keyword type="function" name="powerpc_emit_X ()" link="orc-PowerPC.html#powerpc-emit-X"/>
+    <keyword type="function" name="powerpc_emit_addi ()" link="orc-PowerPC.html#powerpc-emit-addi"/>
+    <keyword type="function" name="powerpc_emit_b ()" link="orc-PowerPC.html#powerpc-emit-b"/>
+    <keyword type="function" name="powerpc_emit_beq ()" link="orc-PowerPC.html#powerpc-emit-beq"/>
+    <keyword type="function" name="powerpc_emit_bne ()" link="orc-PowerPC.html#powerpc-emit-bne"/>
+    <keyword type="function" name="powerpc_emit_label ()" link="orc-PowerPC.html#powerpc-emit-label"/>
+    <keyword type="function" name="powerpc_emit_lwz ()" link="orc-PowerPC.html#powerpc-emit-lwz"/>
+    <keyword type="function" name="powerpc_emit_ret ()" link="orc-PowerPC.html#powerpc-emit-ret"/>
+    <keyword type="function" name="powerpc_emit_srawi ()" link="orc-PowerPC.html#powerpc-emit-srawi"/>
+    <keyword type="function" name="powerpc_emit_stwu ()" link="orc-PowerPC.html#powerpc-emit-stwu"/>
+    <keyword type="function" name="powerpc_get_constant ()" link="orc-PowerPC.html#powerpc-get-constant"/>
+    <keyword type="enum" name="enum OrcSSERegister" link="orc-SSE.html#OrcSSERegister"/>
+    <keyword type="enum" name="enum OrcTargetSSEFlags" link="orc-SSE.html#OrcTargetSSEFlags"/>
+    <keyword type="macro" name="ORC_SSE_SHUF()" link="orc-SSE.html#ORC-SSE-SHUF:CAPS"/>
+    <keyword type="function" name="orc_sse_emit_0f ()" link="orc-SSE.html#orc-sse-emit-0f"/>
+    <keyword type="function" name="orc_sse_emit_660f ()" link="orc-SSE.html#orc-sse-emit-660f"/>
+    <keyword type="function" name="orc_sse_emit_f20f ()" link="orc-SSE.html#orc-sse-emit-f20f"/>
+    <keyword type="function" name="orc_sse_emit_f30f ()" link="orc-SSE.html#orc-sse-emit-f30f"/>
+    <keyword type="function" name="orc_sse_emit_loadib ()" link="orc-SSE.html#orc-sse-emit-loadib"/>
+    <keyword type="function" name="orc_sse_emit_loadil ()" link="orc-SSE.html#orc-sse-emit-loadil"/>
+    <keyword type="function" name="orc_sse_emit_loadiw ()" link="orc-SSE.html#orc-sse-emit-loadiw"/>
+    <keyword type="function" name="orc_sse_emit_loadpb ()" link="orc-SSE.html#orc-sse-emit-loadpb"/>
+    <keyword type="function" name="orc_sse_emit_loadpl ()" link="orc-SSE.html#orc-sse-emit-loadpl"/>
+    <keyword type="function" name="orc_sse_emit_loadpq ()" link="orc-SSE.html#orc-sse-emit-loadpq"/>
+    <keyword type="function" name="orc_sse_emit_loadpw ()" link="orc-SSE.html#orc-sse-emit-loadpw"/>
+    <keyword type="function" name="orc_sse_emit_pshufd ()" link="orc-SSE.html#orc-sse-emit-pshufd"/>
+    <keyword type="function" name="orc_sse_emit_pshuflw ()" link="orc-SSE.html#orc-sse-emit-pshuflw"/>
+    <keyword type="function" name="orc_sse_emit_shiftimm ()" link="orc-SSE.html#orc-sse-emit-shiftimm"/>
+    <keyword type="function" name="orc_sse_get_cpu_flags ()" link="orc-SSE.html#orc-sse-get-cpu-flags"/>
+    <keyword type="function" name="orc_sse_init ()" link="orc-SSE.html#orc-sse-init"/>
+    <keyword type="function" name="orc_x86_emit_add_imm_memoffset ()" link="orc-x86.html#orc-x86-emit-add-imm-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_add_imm_reg ()" link="orc-x86.html#orc-x86-emit-add-imm-reg"/>
+    <keyword type="function" name="orc_x86_emit_add_reg_memoffset ()" link="orc-x86.html#orc-x86-emit-add-reg-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_align ()" link="orc-x86.html#orc-x86-emit-align"/>
+    <keyword type="function" name="orc_x86_emit_and_imm_memoffset ()" link="orc-x86.html#orc-x86-emit-and-imm-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_and_imm_reg ()" link="orc-x86.html#orc-x86-emit-and-imm-reg"/>
+    <keyword type="function" name="orc_x86_emit_cmp_imm_memoffset ()" link="orc-x86.html#orc-x86-emit-cmp-imm-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_cmp_reg_memoffset ()" link="orc-x86.html#orc-x86-emit-cmp-reg-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_dec_memoffset ()" link="orc-x86.html#orc-x86-emit-dec-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_emms ()" link="orc-x86.html#orc-x86-emit-emms"/>
+    <keyword type="function" name="orc_x86_emit_epilogue ()" link="orc-x86.html#orc-x86-emit-epilogue"/>
+    <keyword type="function" name="orc_x86_emit_je ()" link="orc-x86.html#orc-x86-emit-je"/>
+    <keyword type="function" name="orc_x86_emit_jle ()" link="orc-x86.html#orc-x86-emit-jle"/>
+    <keyword type="function" name="orc_x86_emit_jmp ()" link="orc-x86.html#orc-x86-emit-jmp"/>
+    <keyword type="function" name="orc_x86_emit_jne ()" link="orc-x86.html#orc-x86-emit-jne"/>
+    <keyword type="function" name="orc_x86_emit_label ()" link="orc-x86.html#orc-x86-emit-label"/>
+    <keyword type="function" name="orc_x86_emit_modrm_memoffset ()" link="orc-x86.html#orc-x86-emit-modrm-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_modrm_reg ()" link="orc-x86.html#orc-x86-emit-modrm-reg"/>
+    <keyword type="function" name="orc_x86_emit_mov_imm_reg ()" link="orc-x86.html#orc-x86-emit-mov-imm-reg"/>
+    <keyword type="function" name="orc_x86_emit_mov_memoffset_mmx ()" link="orc-x86.html#orc-x86-emit-mov-memoffset-mmx"/>
+    <keyword type="function" name="orc_x86_emit_mov_memoffset_reg ()" link="orc-x86.html#orc-x86-emit-mov-memoffset-reg"/>
+    <keyword type="function" name="orc_x86_emit_mov_memoffset_sse ()" link="orc-x86.html#orc-x86-emit-mov-memoffset-sse"/>
+    <keyword type="function" name="orc_x86_emit_mov_mmx_memoffset ()" link="orc-x86.html#orc-x86-emit-mov-mmx-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_mov_mmx_reg ()" link="orc-x86.html#orc-x86-emit-mov-mmx-reg"/>
+    <keyword type="function" name="orc_x86_emit_mov_mmx_reg_reg ()" link="orc-x86.html#orc-x86-emit-mov-mmx-reg-reg"/>
+    <keyword type="function" name="orc_x86_emit_mov_reg_memoffset ()" link="orc-x86.html#orc-x86-emit-mov-reg-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_mov_reg_mmx ()" link="orc-x86.html#orc-x86-emit-mov-reg-mmx"/>
+    <keyword type="function" name="orc_x86_emit_mov_reg_reg ()" link="orc-x86.html#orc-x86-emit-mov-reg-reg"/>
+    <keyword type="function" name="orc_x86_emit_mov_reg_sse ()" link="orc-x86.html#orc-x86-emit-mov-reg-sse"/>
+    <keyword type="function" name="orc_x86_emit_mov_sse_memoffset ()" link="orc-x86.html#orc-x86-emit-mov-sse-memoffset"/>
+    <keyword type="function" name="orc_x86_emit_mov_sse_reg ()" link="orc-x86.html#orc-x86-emit-mov-sse-reg"/>
+    <keyword type="function" name="orc_x86_emit_mov_sse_reg_reg ()" link="orc-x86.html#orc-x86-emit-mov-sse-reg-reg"/>
+    <keyword type="function" name="orc_x86_emit_pop ()" link="orc-x86.html#orc-x86-emit-pop"/>
+    <keyword type="function" name="orc_x86_emit_prologue ()" link="orc-x86.html#orc-x86-emit-prologue"/>
+    <keyword type="function" name="orc_x86_emit_push ()" link="orc-x86.html#orc-x86-emit-push"/>
+    <keyword type="function" name="orc_x86_emit_ret ()" link="orc-x86.html#orc-x86-emit-ret"/>
+    <keyword type="function" name="orc_x86_emit_rex ()" link="orc-x86.html#orc-x86-emit-rex"/>
+    <keyword type="function" name="orc_x86_emit_sar_imm_reg ()" link="orc-x86.html#orc-x86-emit-sar-imm-reg"/>
+    <keyword type="function" name="orc_x86_emit_sub_memoffset_reg ()" link="orc-x86.html#orc-x86-emit-sub-memoffset-reg"/>
+    <keyword type="function" name="orc_x86_emit_sub_reg_reg ()" link="orc-x86.html#orc-x86-emit-sub-reg-reg"/>
+    <keyword type="function" name="orc_x86_emit_test_reg_reg ()" link="orc-x86.html#orc-x86-emit-test-reg-reg"/>
+    <keyword type="function" name="orc_x86_get_regname ()" link="orc-x86.html#orc-x86-get-regname"/>
+    <keyword type="function" name="orc_x86_get_regname_16 ()" link="orc-x86.html#orc-x86-get-regname-16"/>
+    <keyword type="function" name="orc_x86_get_regname_64 ()" link="orc-x86.html#orc-x86-get-regname-64"/>
+    <keyword type="function" name="orc_x86_get_regname_mmx ()" link="orc-x86.html#orc-x86-get-regname-mmx"/>
+    <keyword type="function" name="orc_x86_get_regname_ptr ()" link="orc-x86.html#orc-x86-get-regname-ptr"/>
+    <keyword type="function" name="orc_x86_get_regname_sse ()" link="orc-x86.html#orc-x86-get-regname-sse"/>
+    <keyword type="function" name="orc_x86_get_regnum ()" link="orc-x86.html#orc-x86-get-regnum"/>
+    <keyword type="function" name="orc_x86_do_fixups ()" link="orc-x86.html#orc-x86-do-fixups"/>
+    <keyword type="struct" name="OrcVariable" link="orc-misc.html#OrcVariable"/>
+    <keyword type="struct" name="OrcInstruction" link="orc-misc.html#OrcInstruction"/>
+    <keyword type="struct" name="OrcRule" link="orc-misc.html#OrcRule"/>
+    <keyword type="struct" name="OrcFixup" link="orc-misc.html#OrcFixup"/>
+    <keyword type="function" name="OrcRuleEmitFunc ()" link="orc-misc.html#OrcRuleEmitFunc"/>
+    <keyword type="macro" name="ORC_N_REGS" link="orc-misc.html#ORC-N-REGS:CAPS"/>
+    <keyword type="macro" name="ORC_N_INSNS" link="orc-misc.html#ORC-N-INSNS:CAPS"/>
+    <keyword type="macro" name="ORC_N_VARIABLES" link="orc-misc.html#ORC-N-VARIABLES:CAPS"/>
+    <keyword type="macro" name="ORC_N_REGISTERS" link="orc-misc.html#ORC-N-REGISTERS:CAPS"/>
+    <keyword type="macro" name="ORC_N_FIXUPS" link="orc-misc.html#ORC-N-FIXUPS:CAPS"/>
+    <keyword type="macro" name="ORC_N_LABELS" link="orc-misc.html#ORC-N-LABELS:CAPS"/>
+    <keyword type="macro" name="ORC_GP_REG_BASE" link="orc-misc.html#ORC-GP-REG-BASE:CAPS"/>
+    <keyword type="macro" name="ORC_VEC_REG_BASE" link="orc-misc.html#ORC-VEC-REG-BASE:CAPS"/>
+    <keyword type="macro" name="ORC_STRUCT_OFFSET()" link="orc-misc.html#ORC-STRUCT-OFFSET:CAPS"/>
+    <keyword type="enum" name="enum OrcVarType" link="orc-misc.html#OrcVarType"/>
+    <keyword type="function" name="orc_powerpc_init ()" link="orc-misc.html#orc-powerpc-init"/>
+    <keyword type="function" name="orc_arm_init ()" link="orc-misc.html#orc-arm-init"/>
+    <keyword type="function" name="orc_c_init ()" link="orc-misc.html#orc-c-init"/>
+    <keyword type="function" name="orc_parse ()" link="orc-misc.html#orc-parse"/>
+    <keyword type="macro" name="ARRAY_SIZE()" link="orc-misc.html#ARRAY-SIZE:CAPS"/>
+    <keyword type="macro" name="MAX()" link="orc-misc.html#MAX:CAPS"/>
+    <keyword type="macro" name="MIN()" link="orc-misc.html#MIN:CAPS"/>
+    <keyword type="function" name="get_cpuinfo_line ()" link="orc-misc.html#get-cpuinfo-line"/>
+    <keyword type="function" name="get_file ()" link="orc-misc.html#get-file"/>
+    <keyword type="function" name="get_file_int ()" link="orc-misc.html#get-file-int"/>
+    <keyword type="function" name="get_tag_value ()" link="orc-misc.html#get-tag-value"/>
+    <keyword type="function" name="strsplit ()" link="orc-misc.html#strsplit"/>
+    <keyword type="constant" name="ORC_DEBUG_NONE" link="orc-OrcDebug.html#ORC-DEBUG-NONE:CAPS"/>
+    <keyword type="constant" name="ORC_DEBUG_ERROR" link="orc-OrcDebug.html#ORC-DEBUG-ERROR:CAPS"/>
+    <keyword type="constant" name="ORC_DEBUG_WARNING" link="orc-OrcDebug.html#ORC-DEBUG-WARNING:CAPS"/>
+    <keyword type="constant" name="ORC_DEBUG_INFO" link="orc-OrcDebug.html#ORC-DEBUG-INFO:CAPS"/>
+    <keyword type="constant" name="ORC_DEBUG_DEBUG" link="orc-OrcDebug.html#ORC-DEBUG-DEBUG:CAPS"/>
+    <keyword type="constant" name="ORC_DEBUG_LOG" link="orc-OrcDebug.html#ORC-DEBUG-LOG:CAPS"/>
+  </functions>
+</book>
diff --git a/doc/html/right.png b/doc/html/right.png
new file mode 100644 (file)
index 0000000..92832e3
Binary files /dev/null and b/doc/html/right.png differ
diff --git a/doc/html/style.css b/doc/html/style.css
new file mode 100644 (file)
index 0000000..82115eb
--- /dev/null
@@ -0,0 +1,257 @@
+.synopsis, .classsynopsis
+{
+  /* tango:aluminium 1/2 */
+  background: #eeeeec;
+  border: solid 1px #d3d7cf;
+  padding: 0.5em;
+}
+.programlisting
+{
+  /* tango:sky blue 0/1 */
+  background: #e6f3ff;
+  border: solid 1px #729fcf;
+  padding: 0.5em;
+}
+.variablelist
+{
+  padding: 4px;
+  margin-left: 3em;
+}
+.variablelist td:first-child
+{
+  vertical-align: top;
+}
+
+@media screen {
+  sup a.footnote
+  {
+    position: relative;
+    top: 0em ! important;
+    
+  }
+  /* this is needed so that the local anchors are displayed below the naviagtion */
+  div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name]
+  {
+    position: relative;
+    padding-top:4.5em;
+  }
+  /* this seems to be a bug in the xsl style sheets when generating indexes */
+  div.index div.index
+  {
+    top: 0em;
+  }
+  /* make space for the fixed navigation bar and add space at the bottom so that
+   * link targets appear somewhat close to top
+   */
+  body
+  {
+    padding-top: 3.2em;
+    padding-bottom: 20em;
+  }
+  /* style and size the navigation bar */
+  table.navigation#top
+  {
+    position: fixed;
+    /* tango:scarlet red 0/1 */
+    background: #ffe6e6;
+    border: solid 1px #ef2929;
+    margin-top: 0;
+    margin-bottom: 0;
+    top: 0;
+    left: 0;
+    height: 3em;
+    z-index: 10;
+  }
+  .navigation a, .navigation a:visited
+  {
+    /* tango:scarlet red 3 */
+    color: #a40000;
+  }
+  .navigation a:hover
+  {
+    /* tango:scarlet red 1 */
+    color: #ef2929;
+  }
+  td.shortcuts
+  {
+    /* tango:scarlet red 1 */
+    color: #ef2929;
+    font-size: 80%;
+    white-space: nowrap;
+  }
+}
+@media print {
+  table.navigation {
+    visibility: collapse;
+    display: none;
+  }
+  div.titlepage table.navigation {
+    visibility: visible;
+    display: table;
+    /* tango:scarlet red 0/1 */
+    background: #ffe6e6;
+    border: solid 1px #ef2929;
+    margin-top: 0;
+    margin-bottom: 0;
+    top: 0;
+    left: 0;
+    height: 3em;
+  }
+}
+
+.navigation .title
+{
+  font-size: 200%;
+}
+
+div.gallery-float
+{
+  float: left;
+  padding: 10px;
+}
+div.gallery-float img
+{
+  border-style: none;
+}
+div.gallery-spacer
+{
+  clear: both;
+}
+
+a, a:visited
+{
+  text-decoration: none;
+  /* tango:sky blue 2 */
+  color: #3465a4;
+}
+a:hover
+{
+  text-decoration: underline;
+  /* tango:sky blue 1 */
+  color: #729fcf;
+}
+
+div.table table
+{
+  border-collapse: collapse;
+  border-spacing: 0px;
+  /* tango:aluminium 3 */
+  border: solid 1px #babdb6;
+}
+
+div.table table td, div.table table th
+{
+  /* tango:aluminium 3 */
+  border: solid 1px #babdb6;
+  padding: 3px;
+  vertical-align: top;
+}
+
+div.table table th
+{
+  /* tango:aluminium 2 */
+  background-color: #d3d7cf;
+}
+
+hr
+{
+  /* tango:aluminium 3 */
+  color: #babdb6;
+  background: #babdb6;
+  border: none 0px;
+  height: 1px;
+  clear: both;
+}
+
+.footer
+{
+  padding-top: 3.5em;
+  /* tango:aluminium 3 */
+  color: #babdb6;
+  text-align: center;
+  font-size: 80%;
+}
+
+.warning
+{
+  /* tango:orange 0/1 */
+  background: #ffeed9;
+  border-color: #ffb04f;
+}
+.note
+{
+  /* tango:chameleon 0/0.5 */
+  background: #d8ffb2;
+  border-color: #abf562;
+}
+.note, .warning
+{
+  padding: 0.5em;
+  border-width: 1px;
+  border-style: solid;
+}
+.note h3, .warning h3
+{
+  margin-top: 0.0em
+}
+.note p, .warning p
+{
+  margin-bottom: 0.0em
+}
+
+/* blob links */
+h2 .extralinks, h3 .extralinks
+{
+  float: right;
+  /* tango:aluminium 3 */
+  color: #babdb6;
+  font-size: 80%;
+  font-weight: normal;
+}
+
+/* code listings */
+
+.listing_code .programlisting .cbracket   { color: #a40000; } /* tango: scarlet red 3 */
+.listing_code .programlisting .comment    { color: #a1a39d; } /* tango: aluminium 4 */
+.listing_code .programlisting .function   { color: #000000; font-weight: bold; }
+.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */
+.listing_code .programlisting .keyword    { color: #4e9a06; } /* tango: chameleon 3  */
+.listing_code .programlisting .linenum    { color: #babdb6; } /* tango: aluminium 3 */
+.listing_code .programlisting .normal     { color: #000000; }
+.listing_code .programlisting .number     { color: #75507b; } /* tango: plum 2 */
+.listing_code .programlisting .preproc    { color: #204a87; } /* tango: sky blue 3  */
+.listing_code .programlisting .string     { color: #c17d11; } /* tango: chocolate 2 */
+.listing_code .programlisting .type       { color: #000000; }
+.listing_code .programlisting .type a     { color: #11326b; } /* tango: sky blue 4 */
+.listing_code .programlisting .symbol     { color: #ce5c00; } /* tango: orange 3 */
+
+.listing_frame {
+  /* tango:sky blue 1 */
+  border: solid 1px #729fcf;
+  padding: 0px;
+}
+
+.listing_lines, .listing_code {
+  margin-top: 0px;
+  margin-bottom: 0px;
+  padding: 0.5em;
+}
+.listing_lines {
+  /* tango:sky blue 0.5 */
+  background: #a6c5e3;
+  /* tango:aluminium 6 */
+  color: #2e3436;
+}
+.listing_code {
+  /* tango:sky blue 0 */
+  background: #e6f3ff;
+}
+.listing_code .programlisting {
+  /* override from previous */
+  border: none 0px;
+  padding: 0px;
+}
+.listing_lines pre, .listing_code pre {
+  margin: 0px;
+}
+
diff --git a/doc/html/up.png b/doc/html/up.png
new file mode 100644 (file)
index 0000000..85b3e2a
Binary files /dev/null and b/doc/html/up.png differ
diff --git a/doc/opcode_table.xml b/doc/opcode_table.xml
new file mode 100644 (file)
index 0000000..40692ec
--- /dev/null
@@ -0,0 +1,1529 @@
+<table frame="all" id="table-basictypes" xreflabel="Table of Opcodes">
+<title>Table of Opcodes</title>
+<tgroup cols="3" align="left" colsep="1" rowsep="1">
+<thead>
+<row>
+<entry>opcode</entry>
+<entry>destination size</entry>
+<entry>source 1 size</entry>
+<entry>source 2 size</entry>
+<entry>description</entry>
+<entry>pseudo code</entry>
+</row>
+</thead>
+<tbody valign="top">
+<row>
+<entry>absb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>absolute value</entry>
+<entry>(a &lt; 0) ? -a : a</entry>
+</row>
+<row>
+<entry>addb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>add</entry>
+<entry>a + b</entry>
+</row>
+<row>
+<entry>addssb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>add with signed saturate</entry>
+<entry>clamp(a + b)</entry>
+</row>
+<row>
+<entry>addusb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>add with unsigned saturate</entry>
+<entry>clamp(a + b)</entry>
+</row>
+<row>
+<entry>andb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>bitwise AND</entry>
+<entry>a &amp; b</entry>
+</row>
+<row>
+<entry>andnb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>bitwise AND NOT</entry>
+<entry>a &amp; (~b)</entry>
+</row>
+<row>
+<entry>avgsb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>signed average</entry>
+<entry>(a + b + 1)&gt;&gt;1</entry>
+</row>
+<row>
+<entry>avgub</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>unsigned average</entry>
+<entry>(a + b + 1)&gt;&gt;1</entry>
+</row>
+<row>
+<entry>cmpeqb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>compare equal</entry>
+<entry>(a == b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>cmpgtsb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>compare greater than</entry>
+<entry>(a &gt; b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>copyb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>copy</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>loadb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>load from memory</entry>
+<entry>array[i]</entry>
+</row>
+<row>
+<entry>loadoffb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>4S</entry>
+<entry>load from memory with offset</entry>
+<entry>array[i+offset]</entry>
+</row>
+<row>
+<entry>loadupdb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>load upsampled duplicate</entry>
+<entry>array[i>>1]</entry>
+</row>
+<row>
+<entry>loadupib</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>load upsampled interpolate</entry>
+<entry>(array[i>>1] + array[(i+1)>>1] + 1)>>1</entry>
+</row>
+<row>
+<entry>loadpb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>load parameter or constant</entry>
+<entry>scalar</entry>
+</row>
+<row>
+<entry>ldresnearb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>4S</entry>
+<entry>load, nearest neighbor resampled</entry>
+<entry>array[(b+c*i)>>8]</entry>
+</row>
+<row>
+<entry>ldresnearl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4S</entry>
+<entry>load, nearest neighbor resampled</entry>
+<entry>array[(b+c*i)>>8]</entry>
+</row>
+<row>
+<entry>ldreslinb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>4S</entry>
+<entry>load, bilinear resampled</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>ldreslinl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4S</entry>
+<entry>load, bilinear resampled</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>maxsb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>signed maximum</entry>
+<entry>(a &gt; b) ? a : b</entry>
+</row>
+<row>
+<entry>maxub</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>unsigned maximum</entry>
+<entry>(a &gt; b) ? a : b</entry>
+</row>
+<row>
+<entry>minsb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>signed minimum</entry>
+<entry>(a &lt; b) ? a : b</entry>
+</row>
+<row>
+<entry>minub</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>unsigned minimum</entry>
+<entry>(a &lt; b) ? a : b</entry>
+</row>
+<row>
+<entry>mullb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>low bits of multiply</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>mulhsb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>high bits of signed multiply</entry>
+<entry>(a * b) &gt;&gt; 8</entry>
+</row>
+<row>
+<entry>mulhub</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>high bits of unsigned multiply</entry>
+<entry>(a * b) &gt;&gt; 8</entry>
+</row>
+<row>
+<entry>orb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>bitwise or</entry>
+<entry>a | b</entry>
+</row>
+<row>
+<entry>shlb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1S</entry>
+<entry>shift left</entry>
+<entry>a &lt;&lt; b</entry>
+</row>
+<row>
+<entry>shrsb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1S</entry>
+<entry>signed shift right</entry>
+<entry>a &gt;&gt; b</entry>
+</row>
+<row>
+<entry>shrub</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1S</entry>
+<entry>unsigned shift right</entry>
+<entry>a &gt;&gt; b</entry>
+</row>
+<row>
+<entry>signb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>sign</entry>
+<entry>sign(a)</entry>
+</row>
+<row>
+<entry>storeb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>store to memory</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>subb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>subtract</entry>
+<entry>a - b</entry>
+</row>
+<row>
+<entry>subssb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>subtract with signed saturate</entry>
+<entry>clamp(a - b)</entry>
+</row>
+<row>
+<entry>subusb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>subtract with unsigned saturate</entry>
+<entry>clamp(a - b)</entry>
+</row>
+<row>
+<entry>xorb</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>bitwise XOR</entry>
+<entry>a ^ b</entry>
+</row>
+<row>
+<entry>absw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>absolute value</entry>
+<entry>(a &lt; 0) ? -a : a</entry>
+</row>
+<row>
+<entry>addw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>add</entry>
+<entry>a + b</entry>
+</row>
+<row>
+<entry>addssw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>add with signed saturate</entry>
+<entry>clamp(a + b)</entry>
+</row>
+<row>
+<entry>addusw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>add with unsigned saturate</entry>
+<entry>clamp(a + b)</entry>
+</row>
+<row>
+<entry>andw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>bitwise AND</entry>
+<entry>a &amp; b</entry>
+</row>
+<row>
+<entry>andnw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>bitwise AND NOT</entry>
+<entry>a &amp; (~b)</entry>
+</row>
+<row>
+<entry>avgsw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>signed average</entry>
+<entry>(a + b + 1)&gt;&gt;1</entry>
+</row>
+<row>
+<entry>avguw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>unsigned average</entry>
+<entry>(a + b + 1)&gt;&gt;1</entry>
+</row>
+<row>
+<entry>cmpeqw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>compare equal</entry>
+<entry>(a == b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>cmpgtsw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>compare greater than</entry>
+<entry>(a &gt; b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>copyw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>copy</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>div255w</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>divide by 255</entry>
+<entry>a/255</entry>
+</row>
+<row>
+<entry>divluw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>saturated unsigned divide 16-bit by 8-bit</entry>
+<entry>clamp(a/(b &amp; 255),0,255)</entry>
+</row>
+<row>
+<entry>loadw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>load from memory</entry>
+<entry>array[i]</entry>
+</row>
+<row>
+<entry>loadoffw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>4S</entry>
+<entry>load from memory with offset</entry>
+<entry>array[i+offset]</entry>
+</row>
+<row>
+<entry>loadpw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>load parameter or constant</entry>
+<entry>scalar</entry>
+</row>
+<row>
+<entry>maxsw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>signed maximum</entry>
+<entry>(a &gt; b) ? a : b</entry>
+</row>
+<row>
+<entry>maxuw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>unsigned maximum</entry>
+<entry>(a &gt; b) ? a : b</entry>
+</row>
+<row>
+<entry>minsw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>signed minimum</entry>
+<entry>(a &lt; b) ? a : b</entry>
+</row>
+<row>
+<entry>minuw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>unsigned minimum</entry>
+<entry>(a &lt; b) ? a : b</entry>
+</row>
+<row>
+<entry>mullw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>low bits of multiply</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>mulhsw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>high bits of signed multiply</entry>
+<entry>(a * b) &gt;&gt; 8</entry>
+</row>
+<row>
+<entry>mulhuw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>high bits of unsigned multiply</entry>
+<entry>(a * b) &gt;&gt; 8</entry>
+</row>
+<row>
+<entry>orw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>bitwise or</entry>
+<entry>a | b</entry>
+</row>
+<row>
+<entry>shlw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2S</entry>
+<entry>shift left</entry>
+<entry>a &lt;&lt; b</entry>
+</row>
+<row>
+<entry>shrsw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2S</entry>
+<entry>signed shift right</entry>
+<entry>a &gt;&gt; b</entry>
+</row>
+<row>
+<entry>shruw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2S</entry>
+<entry>unsigned shift right</entry>
+<entry>a &gt;&gt; b</entry>
+</row>
+<row>
+<entry>signw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>sign</entry>
+<entry>sign(a)</entry>
+</row>
+<row>
+<entry>storew</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>store to memory</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>subw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>subtract</entry>
+<entry>a - b</entry>
+</row>
+<row>
+<entry>subssw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>subtract with signed saturate</entry>
+<entry>clamp(a - b)</entry>
+</row>
+<row>
+<entry>subusw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>subtract with unsigned saturate</entry>
+<entry>clamp(a - b)</entry>
+</row>
+<row>
+<entry>xorw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>bitwise XOR</entry>
+<entry>a ^ b</entry>
+</row>
+<row>
+<entry>absl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>absolute value</entry>
+<entry>(a &lt; 0) ? -a : a</entry>
+</row>
+<row>
+<entry>addl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>add</entry>
+<entry>a + b</entry>
+</row>
+<row>
+<entry>addssl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>add with signed saturate</entry>
+<entry>clamp(a + b)</entry>
+</row>
+<row>
+<entry>addusl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>add with unsigned saturate</entry>
+<entry>clamp(a + b)</entry>
+</row>
+<row>
+<entry>andl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>bitwise AND</entry>
+<entry>a &amp; b</entry>
+</row>
+<row>
+<entry>andnl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>bitwise AND NOT</entry>
+<entry>a &amp; (~b)</entry>
+</row>
+<row>
+<entry>avgsl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>signed average</entry>
+<entry>(a + b + 1)&gt;&gt;1</entry>
+</row>
+<row>
+<entry>avgul</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>unsigned average</entry>
+<entry>(a + b + 1)&gt;&gt;1</entry>
+</row>
+<row>
+<entry>cmpeql</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>compare equal</entry>
+<entry>(a == b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>cmpgtsl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>compare greater than</entry>
+<entry>(a &gt; b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>copyl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>copy</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>loadl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>load from memory</entry>
+<entry>array[i]</entry>
+</row>
+<row>
+<entry>loadoffl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4S</entry>
+<entry>load from memory with offset</entry>
+<entry>array[i+offset]</entry>
+</row>
+<row>
+<entry>loadpl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>load parameter or constant</entry>
+<entry>scalar</entry>
+</row>
+<row>
+<entry>maxsl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>signed maximum</entry>
+<entry>(a &gt; b) ? a : b</entry>
+</row>
+<row>
+<entry>maxul</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>unsigned maximum</entry>
+<entry>(a &gt; b) ? a : b</entry>
+</row>
+<row>
+<entry>minsl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>signed minimum</entry>
+<entry>(a &lt; b) ? a : b</entry>
+</row>
+<row>
+<entry>minul</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>unsigned minimum</entry>
+<entry>(a &lt; b) ? a : b</entry>
+</row>
+<row>
+<entry>mulll</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>low bits of multiply</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>mulhsl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>high bits of signed multiply</entry>
+<entry>(a * b) &gt;&gt; 16</entry>
+</row>
+<row>
+<entry>mulhul</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>high bits of unsigned multiply</entry>
+<entry>(a * b) &gt;&gt; 16</entry>
+</row>
+<row>
+<entry>orl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>bitwise or</entry>
+<entry>a | b</entry>
+</row>
+<row>
+<entry>shll</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4S</entry>
+<entry>shift left</entry>
+<entry>a &lt;&lt; b</entry>
+</row>
+<row>
+<entry>shrsl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4S</entry>
+<entry>signed shift right</entry>
+<entry>a &gt;&gt; b</entry>
+</row>
+<row>
+<entry>shrul</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4S</entry>
+<entry>unsigned shift right</entry>
+<entry>a &gt;&gt; b</entry>
+</row>
+<row>
+<entry>signl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>sign</entry>
+<entry>sign(a)</entry>
+</row>
+<row>
+<entry>storel</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>store to memory</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>subl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>subtract</entry>
+<entry>a - b</entry>
+</row>
+<row>
+<entry>subssl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>subtract with signed saturate</entry>
+<entry>clamp(a - b)</entry>
+</row>
+<row>
+<entry>subusl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>subtract with unsigned saturate</entry>
+<entry>clamp(a - b)</entry>
+</row>
+<row>
+<entry>xorl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>bitwise XOR</entry>
+<entry>a ^ b</entry>
+</row>
+<row>
+<entry>loadq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>load from memory</entry>
+<entry>array[i]</entry>
+</row>
+<row>
+<entry>loadpq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>load parameter or constant</entry>
+<entry>scalar</entry>
+</row>
+<row>
+<entry>storeq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>store to memory</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>splatw3q</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>duplicates high 16-bits to lower 48 bits</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>copyq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>cmpeqq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>cmpgtsq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>andq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>andnq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>orq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>xorq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>addq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>subq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>shlq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8S</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>shrsq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8S</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>shruq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8S</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>convsbw</entry>
+<entry>2</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>convert signed</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convubw</entry>
+<entry>2</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>convert unsigned</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>splatbw</entry>
+<entry>2</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>duplicates 8 bits to both halfs of 16 bits</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>splatbl</entry>
+<entry>4</entry>
+<entry>1</entry>
+<entry></entry>
+<entry>duplicates 8 bits to all parts of 32 bits</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>convswl</entry>
+<entry>4</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>convert signed</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convuwl</entry>
+<entry>4</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>convert unsigned</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convslq</entry>
+<entry>8</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>signed convert</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convulq</entry>
+<entry>8</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>unsigned convert</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convwb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>convert</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convhwb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>shift and convert</entry>
+<entry>a>>8</entry>
+</row>
+<row>
+<entry>convssswb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>convert signed to signed with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convsuswb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>convert signed to unsigned with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convusswb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>convert unsigned to signed with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convuuswb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>convert unsigned to unsigned with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convlw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>convert</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convhlw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>shift and convert</entry>
+<entry>a>>16</entry>
+</row>
+<row>
+<entry>convssslw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>convert signed to signed with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convsuslw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>convert signed to unsigned with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convusslw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>convert unsigned to signed with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convuuslw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>convert unsigned to unsigned with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convql</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>convert</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convsssql</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>convert signed to signed with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convsusql</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>convert signed to unsigned with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convussql</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>convert unsigned to signed with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>convuusql</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry>convert unsigned to unsigned with saturation</entry>
+<entry>clamp(a)</entry>
+</row>
+<row>
+<entry>mulsbw</entry>
+<entry>2</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>multiply signed</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>mulubw</entry>
+<entry>2</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>multiply unsigned</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>mulswl</entry>
+<entry>4</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>multiply signed</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>muluwl</entry>
+<entry>4</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>multiply unsigned</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>accw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>accumulate</entry>
+<entry>+= a</entry>
+</row>
+<row>
+<entry>accl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>accumulate</entry>
+<entry>+= a</entry>
+</row>
+<row>
+<entry>accsadubl</entry>
+<entry>4</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>accumulate absolute difference</entry>
+<entry>+= abs(a - b)</entry>
+</row>
+<row>
+<entry>swapw</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>endianness swap</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>swapl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>endianness swap</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>swapwl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>swapq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>swaplq</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>select0wb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>select first half</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>select1wb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>select second half</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>select0lw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>select first half</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>select1lw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>select second half</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>mergewl</entry>
+<entry>4</entry>
+<entry>2</entry>
+<entry>2</entry>
+<entry>merge halves</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>mergebw</entry>
+<entry>2</entry>
+<entry>1</entry>
+<entry>1</entry>
+<entry>merge halves</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>splitql</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>splitlw</entry>
+<entry>2</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>split first/second words</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>splitwb</entry>
+<entry>1</entry>
+<entry>2</entry>
+<entry></entry>
+<entry>split first/second bytes</entry>
+<entry>special</entry>
+</row>
+<row>
+<entry>addf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>add</entry>
+<entry>a + b</entry>
+</row>
+<row>
+<entry>subf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>subtract</entry>
+<entry>a - b</entry>
+</row>
+<row>
+<entry>mulf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>multiply</entry>
+<entry>a * b</entry>
+</row>
+<row>
+<entry>divf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>divide</entry>
+<entry>a / b</entry>
+</row>
+<row>
+<entry>sqrtf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>square root</entry>
+<entry>sqrt(a)</entry>
+</row>
+<row>
+<entry>maxf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>maximum</entry>
+<entry>max(a,b)</entry>
+</row>
+<row>
+<entry>minf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>minimum</entry>
+<entry>min(a,b)</entry>
+</row>
+<row>
+<entry>cmpeqf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>compare equal</entry>
+<entry>(a == b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>cmpltf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>compare less than</entry>
+<entry>(a == b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>cmplef</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry>compare less than or equal</entry>
+<entry>(a == b) ? (~0) : 0</entry>
+</row>
+<row>
+<entry>convfl</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>convert float point to integer</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>convlf</entry>
+<entry>4</entry>
+<entry>4</entry>
+<entry></entry>
+<entry>convert integer to floating point</entry>
+<entry>a</entry>
+</row>
+<row>
+<entry>addd</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>subd</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>muld</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>divd</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>sqrtd</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>maxd</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>mind</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>cmpeqd</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>cmpltd</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>cmpled</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>convdl</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>convld</entry>
+<entry>8</entry>
+<entry>4</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>convfd</entry>
+<entry>8</entry>
+<entry>4</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+<row>
+<entry>convdf</entry>
+<entry>4</entry>
+<entry>8</entry>
+<entry></entry>
+<entry></entry>
+<entry></entry>
+</row>
+</tbody>
+</tgroup>
+</table>
diff --git a/doc/opcodes.xml b/doc/opcodes.xml
new file mode 100644 (file)
index 0000000..5e2235a
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % version-entities SYSTEM "version.entities">
+%version-entities;
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<refentry id="orc-opcodes" revision="29 may 2009">
+<refmeta>
+<refentrytitle>Orc Opcodes</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>Orc</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Orc Opcodes</refname>
+<refpurpose>
+Description of Opcodes
+</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Orc Opcodes</title>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    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.
+  </para>
+  
+  <para>
+    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.
+  </para>
+
+  <para>
+    The "merge" opcodes take two values and put them together in
+    memory order.
+  </para>
+  
+  <para>
+    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.
+  </para>
+
+  <para>
+    Shift opcodes only work with constants or parameters as the
+    second source value.
+  </para>
+
+  <para>
+    For more precise understanding of operations, it is recommended
+    to compile a program for the C target and examine the resulting C
+    source code.
+  </para>
+
+  <xi:include href="opcode_table.xml"/>
+
+  <para>
+    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.
+  </para>
+
+</refsect1>
+
+<refsect1>
+<title>Rule Coverage</title>
+
+  <para>
+    The values for shift operations are not correct in this table.
+  </para>
+  
+  <xi:include href="table.xml"/>
+
+</refsect1>
+
+</refentry>
+
diff --git a/doc/orc-docs.sgml b/doc/orc-docs.sgml
new file mode 100644 (file)
index 0000000..a9170ae
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY % version-entities SYSTEM "version.entities">
+%version-entities;
+]>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+  <bookinfo>
+    <title>Orc Reference Manual</title>
+    <releaseinfo>
+      for Orc-&ORC_VERSION;.
+      The latest version of this documentation can be found on-line at
+      <ulink role="online-location" url="http://code.entropywave.com/documentation/orc/">http://code.entropywave.com/documentation/orc/</ulink>.
+    </releaseinfo>
+  </bookinfo>
+
+  <chapter>
+    <title>Overview</title>
+    <xi:include href="building.xml"/>
+    <xi:include href="concepts.xml"/>
+    <xi:include href="tutorial.xml"/>
+  </chapter>
+
+  <chapter>
+    <title>Application API</title>
+    <xi:include href="xml/orc.xml"/>
+    <xi:include href="xml/orcprogram.xml"/>
+    <xi:include href="xml/orccompiler.xml"/>
+    <xi:include href="xml/orcexecutor.xml"/>
+    <xi:include href="opcodes.xml"/>
+  </chapter>
+  <chapter>
+    <title>Extension API</title>
+    <xi:include href="xml/orcdebug.xml"/>
+    <xi:include href="xml/orcopcode.xml"/>
+    <xi:include href="xml/orcutils.xml"/>
+    <xi:include href="xml/orcrule.xml"/>
+  </chapter>
+  <chapter>
+    <title>Code Generation</title>
+    <xi:include href="xml/orcarm.xml"/>
+    <xi:include href="xml/orcmmx.xml"/>
+    <xi:include href="xml/orcpowerpc.xml"/>
+    <xi:include href="xml/orcsse.xml"/>
+    <xi:include href="xml/orcx86.xml"/>
+  </chapter>
+  <chapter>
+    <title>Herein lie dragons</title>
+    <xi:include href="xml/misc.xml"/>
+  </chapter>
+</book>
diff --git a/doc/orc-overrides.txt b/doc/orc-overrides.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/orc-sections.txt b/doc/orc-sections.txt
new file mode 100644 (file)
index 0000000..a70f68e
--- /dev/null
@@ -0,0 +1,324 @@
+<SECTION>
+<FILE>orc</FILE>
+orc_init
+</SECTION>
+
+<SECTION>
+<FILE>orcprogram</FILE>
+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
+
+<SUBSECTION>
+orc_program_find_var_by_name
+orc_program_allocate_register
+orc_program_get_max_var_size
+orc_program_dup_temporary
+</SECTION>
+
+<SECTION>
+<FILE>orcutils</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>misc</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orcdebug</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orccompiler</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orcopcode</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orcexecutor</FILE>
+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
+
+</SECTION>
+
+<SECTION>
+<FILE>orcrule</FILE>
+orc_rule_register
+</SECTION>
+
+<SECTION>
+<FILE>orcx86</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orcsse</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orcmmx</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orcarm</FILE>
+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
+</SECTION>
+
+<SECTION>
+<FILE>orcpowerpc</FILE>
+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
+</SECTION>
diff --git a/doc/orc.types b/doc/orc.types
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/table.xml b/doc/table.xml
new file mode 100644 (file)
index 0000000..14beff6
--- /dev/null
@@ -0,0 +1,1719 @@
+<table frame="all" id="table-basictypes" xreflabel="Table of Opcode Rule Coverage">
+<title>Table of Opcode Rule Coverage</title>
+<tgroup cols="7" align="left" colsep="1" rowsep="1">
+<thead>
+<row>
+<entry>opcode name</entry>
+<entry>sse</entry>
+<entry>mmx</entry>
+<entry>altivec</entry>
+<entry>arm</entry>
+<entry>neon</entry>
+<entry>c64x-c</entry>
+</row>
+</thead>
+<tbody valign="top">
+<row>
+<entry>absb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addssb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addusb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andnb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>avgsb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>avgub</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpeqb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpgtsb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>copyb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadoffb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadupdb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadupib</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadpb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>ldresnearb</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>ldresnearl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>ldreslinb</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>ldreslinl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxsb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxub</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>minsb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>minub</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mullb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulhsb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulhub</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>orb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shlb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shrsb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shrub</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>signb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>storeb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subssb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subusb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>xorb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>absw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addssw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addusw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andnw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>avgsw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>avguw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpeqw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpgtsw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>copyw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>div255w</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>divluw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadoffw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadpw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxsw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxuw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>minsw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>minuw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mullw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulhsw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulhuw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>orw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shlw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shrsw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shruw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>signw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>storew</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subssw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subusw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>xorw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>absl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addssl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addusl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andnl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>avgsl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>avgul</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpeql</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpgtsl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>copyl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadoffl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadpl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxsl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxul</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>minsl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>minul</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulll</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulhsl</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulhul</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>orl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shll</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shrsl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shrul</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>signl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>storel</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subssl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subusl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>xorl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>loadpq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>storeq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>splatw3q</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>copyq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpeqq</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpgtsq</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>andnq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>orq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>xorq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addq</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subq</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shlq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shrsq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>shruq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convsbw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convubw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>splatbw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>splatbl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convswl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convuwl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convslq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convulq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convwb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convhwb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convssswb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convsuswb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convusswb</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convuuswb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convlw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convhlw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convssslw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convsuslw</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convusslw</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convuuslw</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convql</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convsssql</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convsusql</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convussql</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convuusql</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulsbw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulubw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulswl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>muluwl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>accw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>accl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>accsadubl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>swapw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>swapl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>swapwl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>swapq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>swaplq</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>select0wb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>select1wb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>select0lw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>select1lw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mergewl</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mergebw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>splitql</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>splitlw</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>splitwb</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mulf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>divf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>sqrtf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>minf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpeqf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpltf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmplef</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convfl</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convlf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>yes</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>addd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>subd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>muld</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>divd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>sqrtd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>maxd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>mind</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpeqd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpltd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>cmpled</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convdl</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convld</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convfd</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+<row>
+<entry>convdf</entry>
+<entry>yes</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+<entry>no</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
diff --git a/doc/tmpl/misc.sgml b/doc/tmpl/misc.sgml
new file mode 100644 (file)
index 0000000..e77b880
--- /dev/null
@@ -0,0 +1,242 @@
+<!-- ##### SECTION Title ##### -->
+misc
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT OrcVariable ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcInstruction ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcRule ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcFixup ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### USER_FUNCTION OrcRuleEmitFunc ##### -->
+<para>
+
+</para>
+
+@p: 
+@user: 
+@insn: 
+
+
+<!-- ##### MACRO ORC_N_REGS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_N_INSNS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_N_VARIABLES ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_N_REGISTERS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_N_FIXUPS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_N_LABELS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_GP_REG_BASE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_VEC_REG_BASE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_STRUCT_OFFSET ##### -->
+<para>
+
+</para>
+
+@struct_type: 
+@member: 
+
+
+<!-- ##### ENUM OrcVarType ##### -->
+<para>
+
+</para>
+
+@ORC_VAR_TYPE_TEMP: 
+@ORC_VAR_TYPE_SRC: 
+@ORC_VAR_TYPE_DEST: 
+@ORC_VAR_TYPE_CONST: 
+@ORC_VAR_TYPE_PARAM: 
+@ORC_VAR_TYPE_ACCUMULATOR: 
+
+<!-- ##### FUNCTION orc_powerpc_init ##### -->
+<para>
+
+</para>
+
+@void: 
+
+
+<!-- ##### FUNCTION orc_arm_init ##### -->
+<para>
+
+</para>
+
+@void: 
+
+
+<!-- ##### FUNCTION orc_c_init ##### -->
+<para>
+
+</para>
+
+@void: 
+
+
+<!-- ##### FUNCTION orc_parse ##### -->
+<para>
+
+</para>
+
+@code: 
+@programs: 
+@Returns: 
+
+
+<!-- ##### MACRO ARRAY_SIZE ##### -->
+<para>
+
+</para>
+
+@x: 
+
+
+<!-- ##### MACRO MAX ##### -->
+<para>
+
+</para>
+
+@a: 
+@b: 
+
+
+<!-- ##### MACRO MIN ##### -->
+<para>
+
+</para>
+
+@a: 
+@b: 
+
+
+<!-- ##### FUNCTION get_cpuinfo_line ##### -->
+<para>
+
+</para>
+
+@cpuinfo: 
+@tag: 
+@Returns: 
+
+
+<!-- ##### FUNCTION get_file ##### -->
+<para>
+
+</para>
+
+@file: 
+@Returns: 
+
+
+<!-- ##### FUNCTION get_file_int ##### -->
+<para>
+
+</para>
+
+@file: 
+@value: 
+@Returns: 
+
+
+<!-- ##### FUNCTION get_tag_value ##### -->
+<para>
+
+</para>
+
+@s: 
+@tag: 
+@Returns: 
+
+
+<!-- ##### FUNCTION strsplit ##### -->
+<para>
+
+</para>
+
+@s: 
+@delimiter: 
+@Returns: 
+
+
diff --git a/doc/tmpl/mmx.sgml b/doc/tmpl/mmx.sgml
new file mode 100644 (file)
index 0000000..31845b3
--- /dev/null
@@ -0,0 +1,187 @@
+<!-- ##### SECTION Title ##### -->
+mmx
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO ORC_MMX_SHUF ##### -->
+<para>
+
+</para>
+
+@a: 
+@b: 
+@c: 
+@d: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_0f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_660f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_f20f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_f30f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadib ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadil ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadiw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpb ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpl ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpq ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_pshufw ##### -->
+<para>
+
+</para>
+
+@p: 
+@shuf: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_shiftimm ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@modrm_code: 
+@shift: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_mmx_get_cpu_flags ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_mmx_init ##### -->
+<para>
+
+</para>
+
+
+
diff --git a/doc/tmpl/orc-unused.sgml b/doc/tmpl/orc-unused.sgml
new file mode 100644 (file)
index 0000000..82e1b0b
--- /dev/null
@@ -0,0 +1,791 @@
+<!-- ##### SECTION ./tmpl/mmx.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/mmx.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/mmx.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/mmx.sgml:Stability_Level ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/mmx.sgml:Title ##### -->
+mmx
+
+
+<!-- ##### SECTION ./tmpl/sse.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/sse.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/sse.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/sse.sgml:Stability_Level ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/sse.sgml:Title ##### -->
+sse
+
+
+<!-- ##### SECTION ./tmpl/x86.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/x86.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/x86.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/x86.sgml:Stability_Level ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/x86.sgml:Title ##### -->
+x86
+
+
+<!-- ##### MACRO ORC_ARM_A1 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_A2 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_A3 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_A4 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_IP ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_LR ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_PC ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_R0 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_SB ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_SP ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V1 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V2 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V3 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V4 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V5 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V6 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V7 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ARM_V8 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_OPCODE_N_RULES ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_REGCLASS_GP ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_VEC1_REG_BASE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_VEC2_REG_BASE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcArgument ##### -->
+<para>
+
+</para>
+
+@var: 
+@is_indirect: 
+@is_indexed: 
+@index_var: 
+@index_scale: 
+
+<!-- ##### STRUCT OrcOpcode ##### -->
+<para>
+
+</para>
+
+@name: 
+@n_src: 
+@n_dest: 
+@dest_size: 
+@src_size: 
+@rules: 
+@emulate: 
+@emulate_user: 
+
+<!-- ##### STRUCT OrcRegister ##### -->
+<para>
+
+</para>
+
+@var: 
+@is_data: 
+@is_chained: 
+@chained_reg: 
+@merge: 
+
+<!-- ##### STRUCT OrcType ##### -->
+<para>
+
+</para>
+
+@name: 
+@size: 
+
+<!-- ##### FUNCTION mmx_emit_loadi_s16 ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+<!-- ##### FUNCTION orc_arm_emit_dp_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@cond: 
+@opcode: 
+@dest: 
+@src1: 
+@src2: 
+
+<!-- ##### FUNCTION orc_arm_emit_loadimm ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@imm: 
+
+<!-- ##### FUNCTION orc_compiler_allocate_codemem ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+<!-- ##### FUNCTION orc_compiler_get_dest ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@Returns: 
+
+<!-- ##### FUNCTION orc_program_allocate_codemem ##### -->
+<para>
+
+</para>
+
+@program: 
+
+<!-- ##### FUNCTION orc_program_assemble_c ##### -->
+<para>
+
+</para>
+
+@p: 
+
+<!-- ##### FUNCTION orc_program_assemble_powerpc ##### -->
+<para>
+
+</para>
+
+@p: 
+
+<!-- ##### FUNCTION orc_program_assemble_x86 ##### -->
+<para>
+
+</para>
+
+@p: 
+
+<!-- ##### FUNCTION orc_program_dump_asm ##### -->
+<para>
+
+</para>
+
+@program: 
+
+<!-- ##### FUNCTION orc_program_dump_code ##### -->
+<para>
+
+</para>
+
+@program: 
+
+<!-- ##### FUNCTION orc_program_get_max_var_size ##### -->
+<para>
+
+</para>
+
+@program: 
+@Returns: 
+
+<!-- ##### FUNCTION orc_program_powerpc_allocate_register ##### -->
+<para>
+
+</para>
+
+@program: 
+@is_data: 
+@Returns: 
+
+<!-- ##### FUNCTION orc_program_powerpc_init ##### -->
+<para>
+
+</para>
+
+@p: 
+
+<!-- ##### FUNCTION orc_program_powerpc_reset_alloc ##### -->
+<para>
+
+</para>
+
+@program: 
+
+<!-- ##### FUNCTION orc_program_x86_allocate_register ##### -->
+<para>
+
+</para>
+
+@program: 
+@is_data: 
+@Returns: 
+
+<!-- ##### FUNCTION orc_program_x86_init ##### -->
+<para>
+
+</para>
+
+@p: 
+
+<!-- ##### FUNCTION orc_program_x86_register_rules ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION orc_program_x86_reset_alloc ##### -->
+<para>
+
+</para>
+
+@program: 
+
+<!-- ##### FUNCTION orc_type_get ##### -->
+<para>
+
+</para>
+
+@name: 
+@Returns: 
+
+<!-- ##### FUNCTION orc_type_register ##### -->
+<para>
+
+</para>
+
+@name: 
+@size: 
+
+<!-- ##### FUNCTION orc_variable_get_size ##### -->
+<para>
+
+</para>
+
+@var: 
+@Returns: 
+
+<!-- ##### FUNCTION orc_x86_init ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION powerpc_flush ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+<!-- ##### VARIABLE x86_64 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION x86_emit_add_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_add_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_and_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_and_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_cmp_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_dec_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_emms ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+<!-- ##### FUNCTION x86_emit_je ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+<!-- ##### FUNCTION x86_emit_jne ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+<!-- ##### FUNCTION x86_emit_label ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+<!-- ##### FUNCTION x86_emit_modrm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@offset: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_modrm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg1: 
+
+<!-- ##### FUNCTION x86_emit_mov_memoffset_mmx ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_memoffset_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_memoffset_sse ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+@is_aligned: 
+
+<!-- ##### FUNCTION x86_emit_mov_mmx_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_mmx_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_reg_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_reg_mmx ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_reg_sse ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_mov_sse_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+@aligned: 
+@uncached: 
+
+<!-- ##### FUNCTION x86_emit_mov_sse_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+<!-- ##### FUNCTION x86_emit_pop ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_push ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_ret ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+<!-- ##### FUNCTION x86_emit_sar_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+<!-- ##### FUNCTION x86_emit_test_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+<!-- ##### VARIABLE x86_exec_ptr ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION x86_get_regname ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+<!-- ##### FUNCTION x86_get_regname_16 ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+<!-- ##### FUNCTION x86_get_regname_64 ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+<!-- ##### FUNCTION x86_get_regname_mmx ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+<!-- ##### FUNCTION x86_get_regname_ptr ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@i: 
+@Returns: 
+
+<!-- ##### FUNCTION x86_get_regname_sse ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+<!-- ##### FUNCTION x86_get_regnum ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+<!-- ##### FUNCTION x86_test ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
diff --git a/doc/tmpl/orc.sgml b/doc/tmpl/orc.sgml
new file mode 100644 (file)
index 0000000..4ae39e9
--- /dev/null
@@ -0,0 +1,30 @@
+<!-- ##### SECTION Title ##### -->
+orc
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### FUNCTION orc_init ##### -->
+<para>
+
+</para>
+
+@void: 
+
+
diff --git a/doc/tmpl/orcarm.sgml b/doc/tmpl/orcarm.sgml
new file mode 100644 (file)
index 0000000..baf3503
--- /dev/null
@@ -0,0 +1,256 @@
+<!-- ##### SECTION Title ##### -->
+orcarm
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### ENUM OrcArmCond ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### ENUM OrcArmDP ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### ENUM OrcArmRegister ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### FUNCTION orc_arm_do_fixups ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_arm_emit ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@insn: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_add ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@src1: 
+@src2: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_add_imm ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@src1: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_branch ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@cond: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_bx_lr ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_cmp_imm ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@src1: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_label ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_load_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@src1: 
+@offset: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_mov ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@src: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_pop ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@regs: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_push ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@regs: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_sub ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@src1: 
+@src2: 
+
+
+<!-- ##### FUNCTION orc_arm_emit_sub_imm ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@src1: 
+@value: 
+@record: 
+
+
+<!-- ##### FUNCTION orc_arm_loadw ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@src1: 
+@offset: 
+
+
+<!-- ##### FUNCTION orc_arm_reg_name ##### -->
+<para>
+
+</para>
+
+@reg: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_arm_storew ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@dest: 
+@offset: 
+@src1: 
+
+
diff --git a/doc/tmpl/orccompiler.sgml b/doc/tmpl/orccompiler.sgml
new file mode 100644 (file)
index 0000000..df87b4b
--- /dev/null
@@ -0,0 +1,105 @@
+<!-- ##### SECTION Title ##### -->
+orccompiler
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### ENUM OrcCompileResult ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### STRUCT OrcCompiler ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcConstant ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_COMPILER_ERROR ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@...: 
+
+
+<!-- ##### MACRO ORC_COMPILE_RESULT_IS_FATAL ##### -->
+<para>
+
+</para>
+
+@x: 
+
+
+<!-- ##### MACRO ORC_COMPILE_RESULT_IS_SUCCESSFUL ##### -->
+<para>
+
+</para>
+
+@x: 
+
+
+<!-- ##### MACRO ORC_ASM_CODE ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@...: 
+
+
+<!-- ##### MACRO ORC_ENABLE_ASM_CODE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION orc_compiler_append_code ##### -->
+<para>
+
+</para>
+
+@p: 
+@fmt: 
+
+
+<!-- ##### FUNCTION orc_compiler_label_new ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@Returns: 
+
+
diff --git a/doc/tmpl/orcdebug.sgml b/doc/tmpl/orcdebug.sgml
new file mode 100644 (file)
index 0000000..8f7904a
--- /dev/null
@@ -0,0 +1,141 @@
+<!-- ##### SECTION Title ##### -->
+orcdebug
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### ENUM OrcDebugLevel ##### -->
+<para>
+
+</para>
+
+@ORC_DEBUG_NONE: 
+@ORC_DEBUG_ERROR: 
+@ORC_DEBUG_WARNING: 
+@ORC_DEBUG_INFO: 
+@ORC_DEBUG_DEBUG: 
+@ORC_DEBUG_LOG: 
+
+<!-- ##### USER_FUNCTION OrcDebugPrintFunc ##### -->
+<para>
+
+</para>
+
+@level: 
+@file: 
+@func: 
+@line: 
+@format: 
+@varargs: 
+
+
+<!-- ##### MACRO ORC_DEBUG_PRINT ##### -->
+<para>
+
+</para>
+
+@level: 
+@...: 
+
+
+<!-- ##### MACRO ORC_ERROR ##### -->
+<para>
+
+</para>
+
+@...: 
+
+
+<!-- ##### MACRO ORC_WARNING ##### -->
+<para>
+
+</para>
+
+@...: 
+
+
+<!-- ##### MACRO ORC_INFO ##### -->
+<para>
+
+</para>
+
+@...: 
+
+
+<!-- ##### MACRO ORC_DEBUG ##### -->
+<para>
+
+</para>
+
+@...: 
+
+
+<!-- ##### MACRO ORC_LOG ##### -->
+<para>
+
+</para>
+
+@...: 
+
+
+<!-- ##### MACRO ORC_FUNCTION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION orc_debug_get_level ##### -->
+<para>
+
+</para>
+
+@void: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_debug_print ##### -->
+<para>
+
+</para>
+
+@level: 
+@file: 
+@func: 
+@line: 
+@format: 
+@Varargs: 
+
+
+<!-- ##### FUNCTION orc_debug_set_level ##### -->
+<para>
+
+</para>
+
+@level: 
+
+
+<!-- ##### FUNCTION orc_debug_set_print_function ##### -->
+<para>
+
+</para>
+
+@func: 
+
+
diff --git a/doc/tmpl/orcexecutor.sgml b/doc/tmpl/orcexecutor.sgml
new file mode 100644 (file)
index 0000000..1503366
--- /dev/null
@@ -0,0 +1,139 @@
+<!-- ##### SECTION Title ##### -->
+orcexecutor
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT OrcExecutor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION orc_executor_new ##### -->
+<para>
+
+</para>
+
+@program: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_executor_free ##### -->
+<para>
+
+</para>
+
+@ex: 
+
+
+<!-- ##### FUNCTION orc_executor_set_array ##### -->
+<para>
+
+</para>
+
+@ex: 
+@var: 
+@ptr: 
+
+
+<!-- ##### FUNCTION orc_executor_set_array_str ##### -->
+<para>
+
+</para>
+
+@ex: 
+@name: 
+@ptr: 
+
+
+<!-- ##### FUNCTION orc_executor_set_n ##### -->
+<para>
+
+</para>
+
+@ex: 
+@n: 
+
+
+<!-- ##### FUNCTION orc_executor_emulate ##### -->
+<para>
+
+</para>
+
+@ex: 
+
+
+<!-- ##### FUNCTION orc_executor_run ##### -->
+<para>
+
+</para>
+
+@ex: 
+
+
+<!-- ##### FUNCTION orc_executor_get_accumulator ##### -->
+<para>
+
+</para>
+
+@ex: 
+@var: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_executor_get_accumulator_str ##### -->
+<para>
+
+</para>
+
+@ex: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_executor_set_param ##### -->
+<para>
+
+</para>
+
+@ex: 
+@var: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_executor_set_param_str ##### -->
+<para>
+
+</para>
+
+@ex: 
+@name: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_executor_set_program ##### -->
+<para>
+
+</para>
+
+@ex: 
+@program: 
+
+
diff --git a/doc/tmpl/orcmmx.sgml b/doc/tmpl/orcmmx.sgml
new file mode 100644 (file)
index 0000000..aba95a0
--- /dev/null
@@ -0,0 +1,222 @@
+<!-- ##### SECTION Title ##### -->
+orcmmx
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### ENUM OrcMMXRegister ##### -->
+<para>
+
+</para>
+
+@X86_MM0: 
+@X86_MM1: 
+@X86_MM2: 
+@X86_MM3: 
+@X86_MM4: 
+@X86_MM5: 
+@X86_MM6: 
+@X86_MM7: 
+
+<!-- ##### ENUM OrcTargetMMXFlags ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### MACRO ORC_MMX_SHUF ##### -->
+<para>
+
+</para>
+
+@a: 
+@b: 
+@c: 
+@d: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_0f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_660f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_f20f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_f30f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadib ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadil ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadiw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpb ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpl ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpq ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_loadpw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_pshufw ##### -->
+<para>
+
+</para>
+
+@p: 
+@shuf: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_mmx_emit_shiftimm ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@modrm_code: 
+@shift: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_mmx_get_cpu_flags ##### -->
+<para>
+
+</para>
+
+@void: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_mmx_init ##### -->
+<para>
+
+</para>
+
+@void: 
+
+
diff --git a/doc/tmpl/orcopcode.sgml b/doc/tmpl/orcopcode.sgml
new file mode 100644 (file)
index 0000000..66b0245
--- /dev/null
@@ -0,0 +1,229 @@
+<!-- ##### SECTION Title ##### -->
+orcopcode
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### USER_FUNCTION OrcOpcodeEmulateFunc ##### -->
+<para>
+
+</para>
+
+@ex: 
+@user: 
+
+
+<!-- ##### STRUCT OrcOpcodeExecutor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcOpcodeSet ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcRuleSet ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT OrcStaticOpcode ##### -->
+<para>
+
+</para>
+
+@name: 
+@flags: 
+@dest_size: 
+@src_size: 
+@emulateN: 
+
+<!-- ##### STRUCT OrcTarget ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### MACRO ORC_OPCODE_N_ARGS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_STATIC_OPCODE_ACCUMULATOR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_STATIC_OPCODE_N_DEST ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_STATIC_OPCODE_N_SRC ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION orc_opcode_find_by_name ##### -->
+<para>
+
+</para>
+
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_opcode_init ##### -->
+<para>
+
+</para>
+
+@void: 
+
+
+<!-- ##### FUNCTION orc_opcode_register_static ##### -->
+<para>
+
+</para>
+
+@sopcode: 
+@prefix: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_opcode_set_find_by_name ##### -->
+<para>
+
+</para>
+
+@opcode_set: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_opcode_set_get ##### -->
+<para>
+
+</para>
+
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_rule_set_new ##### -->
+<para>
+
+</para>
+
+@opcode_set: 
+@target: 
+@required_flags: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_target_get_asm_preamble ##### -->
+<para>
+
+</para>
+
+@target: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_target_get_by_name ##### -->
+<para>
+
+</para>
+
+@target_name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_target_get_default ##### -->
+<para>
+
+</para>
+
+@void: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_target_get_default_flags ##### -->
+<para>
+
+</para>
+
+@target: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_target_get_name ##### -->
+<para>
+
+</para>
+
+@target: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_target_get_rule ##### -->
+<para>
+
+</para>
+
+@target: 
+@opcode: 
+@target_flags: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_target_register ##### -->
+<para>
+
+</para>
+
+@target: 
+
+
diff --git a/doc/tmpl/orcpowerpc.sgml b/doc/tmpl/orcpowerpc.sgml
new file mode 100644 (file)
index 0000000..aa433ee
--- /dev/null
@@ -0,0 +1,232 @@
+<!-- ##### SECTION Title ##### -->
+orcpowerpc
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### FUNCTION powerpc_get_regname ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION powerpc_regnum ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION powerpc_add_fixup ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@type: 
+@ptr: 
+@label: 
+
+
+<!-- ##### FUNCTION powerpc_do_fixups ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION powerpc_emit ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@insn: 
+
+
+<!-- ##### FUNCTION powerpc_emit_655510 ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@major: 
+@d: 
+@a: 
+@b: 
+@minor: 
+
+
+<!-- ##### FUNCTION powerpc_emit_VA ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@name: 
+@insn: 
+@d: 
+@a: 
+@b: 
+@c: 
+
+
+<!-- ##### FUNCTION powerpc_emit_VX ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@insn: 
+@d: 
+@a: 
+@b: 
+
+
+<!-- ##### FUNCTION powerpc_emit_VX_2 ##### -->
+<para>
+
+</para>
+
+@p: 
+@name: 
+@insn: 
+@d: 
+@a: 
+@b: 
+
+
+<!-- ##### FUNCTION powerpc_emit_X ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@insn: 
+@d: 
+@a: 
+@b: 
+
+
+<!-- ##### FUNCTION powerpc_emit_addi ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@regd: 
+@rega: 
+@imm: 
+
+
+<!-- ##### FUNCTION powerpc_emit_b ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION powerpc_emit_beq ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION powerpc_emit_bne ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION powerpc_emit_label ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION powerpc_emit_lwz ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@regd: 
+@rega: 
+@imm: 
+
+
+<!-- ##### FUNCTION powerpc_emit_ret ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION powerpc_emit_srawi ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@regd: 
+@rega: 
+@shift: 
+@record: 
+
+
+<!-- ##### FUNCTION powerpc_emit_stwu ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@regs: 
+@rega: 
+@offset: 
+
+
+<!-- ##### FUNCTION powerpc_get_constant ##### -->
+<para>
+
+</para>
+
+@p: 
+@type: 
+@value: 
+@Returns: 
+
+
diff --git a/doc/tmpl/orcprogram.sgml b/doc/tmpl/orcprogram.sgml
new file mode 100644 (file)
index 0000000..ae1d06c
--- /dev/null
@@ -0,0 +1,318 @@
+<!-- ##### SECTION Title ##### -->
+orcprogram
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT OrcProgram ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_N_CONSTANTS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_N_RULE_SETS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_N_TARGETS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_PROGRAM_ERROR ##### -->
+<para>
+
+</para>
+
+@program: 
+@...: 
+
+
+<!-- ##### FUNCTION orc_program_new ##### -->
+<para>
+
+</para>
+
+@void: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_new_dss ##### -->
+<para>
+
+</para>
+
+@size1: 
+@size2: 
+@size3: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_new_as ##### -->
+<para>
+
+</para>
+
+@size1: 
+@size2: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_new_ass ##### -->
+<para>
+
+</para>
+
+@size1: 
+@size2: 
+@size3: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_new_ds ##### -->
+<para>
+
+</para>
+
+@size1: 
+@size2: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_free ##### -->
+<para>
+
+</para>
+
+@program: 
+
+
+<!-- ##### FUNCTION orc_program_get_name ##### -->
+<para>
+
+</para>
+
+@program: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_set_name ##### -->
+<para>
+
+</para>
+
+@program: 
+@name: 
+
+
+<!-- ##### FUNCTION orc_program_add_temporary ##### -->
+<para>
+
+</para>
+
+@program: 
+@size: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_add_source ##### -->
+<para>
+
+</para>
+
+@program: 
+@size: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_add_destination ##### -->
+<para>
+
+</para>
+
+@program: 
+@size: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_add_constant ##### -->
+<para>
+
+</para>
+
+@program: 
+@size: 
+@value: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_add_accumulator ##### -->
+<para>
+
+</para>
+
+@program: 
+@size: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_add_parameter ##### -->
+<para>
+
+</para>
+
+@program: 
+@size: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_append ##### -->
+<para>
+
+</para>
+
+@p: 
+@opcode: 
+@arg0: 
+@arg1: 
+@arg2: 
+
+
+<!-- ##### FUNCTION orc_program_append_str ##### -->
+<para>
+
+</para>
+
+@p: 
+@opcode: 
+@arg0: 
+@arg1: 
+@arg2: 
+
+
+<!-- ##### FUNCTION orc_program_append_ds ##### -->
+<para>
+
+</para>
+
+@program: 
+@opcode: 
+@arg0: 
+@arg1: 
+
+
+<!-- ##### FUNCTION orc_program_append_ds_str ##### -->
+<para>
+
+</para>
+
+@p: 
+@opcode: 
+@arg0: 
+@arg1: 
+
+
+<!-- ##### FUNCTION orc_program_compile ##### -->
+<para>
+
+</para>
+
+@p: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_compile_for_target ##### -->
+<para>
+
+</para>
+
+@p: 
+@target: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_compile_full ##### -->
+<para>
+
+</para>
+
+@p: 
+@target: 
+@flags: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_get_asm_code ##### -->
+<para>
+
+</para>
+
+@program: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_find_var_by_name ##### -->
+<para>
+
+</para>
+
+@program: 
+@name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_allocate_register ##### -->
+<para>
+
+</para>
+
+@program: 
+@is_data: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_program_dup_temporary ##### -->
+<para>
+
+</para>
+
+@program: 
+@i: 
+@j: 
+@Returns: 
+
+
diff --git a/doc/tmpl/orcrule.sgml b/doc/tmpl/orcrule.sgml
new file mode 100644 (file)
index 0000000..2f9332d
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ##### SECTION Title ##### -->
+orcrule
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### FUNCTION orc_rule_register ##### -->
+<para>
+
+</para>
+
+@rule_set: 
+@opcode_name: 
+@emit: 
+@emit_user: 
+
+
diff --git a/doc/tmpl/orcsse.sgml b/doc/tmpl/orcsse.sgml
new file mode 100644 (file)
index 0000000..e5ffefe
--- /dev/null
@@ -0,0 +1,241 @@
+<!-- ##### SECTION Title ##### -->
+orcsse
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### ENUM OrcSSERegister ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### ENUM OrcTargetSSEFlags ##### -->
+<para>
+
+</para>
+
+@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: 
+
+<!-- ##### MACRO ORC_SSE_SHUF ##### -->
+<para>
+
+</para>
+
+@a: 
+@b: 
+@c: 
+@d: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_0f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_660f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_f20f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_f30f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadib ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadil ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadiw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpb ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpl ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpq ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_pshufd ##### -->
+<para>
+
+</para>
+
+@p: 
+@shuf: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_pshuflw ##### -->
+<para>
+
+</para>
+
+@p: 
+@shuf: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_shiftimm ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@modrm_code: 
+@shift: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_sse_get_cpu_flags ##### -->
+<para>
+
+</para>
+
+@void: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_sse_init ##### -->
+<para>
+
+</para>
+
+@void: 
+
+
diff --git a/doc/tmpl/orcutils.sgml b/doc/tmpl/orcutils.sgml
new file mode 100644 (file)
index 0000000..59272cc
--- /dev/null
@@ -0,0 +1,117 @@
+<!-- ##### SECTION Title ##### -->
+orcutils
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### TYPEDEF orc_bool ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ORC_ASSERT ##### -->
+<para>
+
+</para>
+
+@test: 
+
+
+<!-- ##### MACRO ORC_BEGIN_DECLS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_CLAMP ##### -->
+<para>
+
+</para>
+
+@x: 
+@a: 
+@b: 
+
+
+<!-- ##### MACRO ORC_END_DECLS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_EXPORT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_GNUC_PREREQ ##### -->
+<para>
+
+</para>
+
+@maj: 
+@min: 
+
+
+<!-- ##### MACRO ORC_GNU_PRINTF ##### -->
+<para>
+
+</para>
+
+@a: 
+@b: 
+
+
+<!-- ##### MACRO ORC_INTERNAL ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ORC_PTR_TO_INT ##### -->
+<para>
+
+</para>
+
+@x: 
+
+
+<!-- ##### MACRO ORC_READ_UINT32_LE ##### -->
+<para>
+
+</para>
+
+@ptr: 
+
+
+<!-- ##### MACRO ORC_WRITE_UINT32_LE ##### -->
+<para>
+
+</para>
+
+@ptr: 
+@val: 
+
+
diff --git a/doc/tmpl/orcx86.sgml b/doc/tmpl/orcx86.sgml
new file mode 100644 (file)
index 0000000..41597b7
--- /dev/null
@@ -0,0 +1,531 @@
+<!-- ##### SECTION Title ##### -->
+orcx86
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### FUNCTION orc_x86_emit_add_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_add_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+@record: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_add_reg_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_align ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_and_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_and_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_cmp_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_cmp_reg_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_dec_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_emms ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_epilogue ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_je ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_jle ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_jmp ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_jne ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_label ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_modrm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@offset: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_modrm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg1: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_memoffset_mmx ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+@is_aligned: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_memoffset_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_memoffset_sse ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+@is_aligned: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_mmx_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+@aligned: 
+@uncached: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_mmx_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_mmx_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_mmx ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_sse ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_sse_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+@aligned: 
+@uncached: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_sse_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_sse_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_pop ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_prologue ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_push ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_ret ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_rex ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+@reg3: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_sar_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_sub_memoffset_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg: 
+@destreg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_sub_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_test_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_16 ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_64 ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_mmx ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_ptr ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_sse ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regnum ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_do_fixups ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
diff --git a/doc/tmpl/sse.sgml b/doc/tmpl/sse.sgml
new file mode 100644 (file)
index 0000000..a2b40cc
--- /dev/null
@@ -0,0 +1,198 @@
+<!-- ##### SECTION Title ##### -->
+sse
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO ORC_SSE_SHUF ##### -->
+<para>
+
+</para>
+
+@a: 
+@b: 
+@c: 
+@d: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_0f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_660f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_f20f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_f30f ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadib ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadil ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadiw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpb ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpl ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpq ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_loadpw ##### -->
+<para>
+
+</para>
+
+@p: 
+@reg: 
+@value: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_pshufd ##### -->
+<para>
+
+</para>
+
+@p: 
+@shuf: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_pshuflw ##### -->
+<para>
+
+</para>
+
+@p: 
+@shuf: 
+@src: 
+@dest: 
+
+
+<!-- ##### FUNCTION orc_sse_emit_shiftimm ##### -->
+<para>
+
+</para>
+
+@p: 
+@insn_name: 
+@code: 
+@modrm_code: 
+@shift: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_sse_get_cpu_flags ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_sse_init ##### -->
+<para>
+
+</para>
+
+
+
diff --git a/doc/tmpl/x86.sgml b/doc/tmpl/x86.sgml
new file mode 100644 (file)
index 0000000..8a275d3
--- /dev/null
@@ -0,0 +1,519 @@
+<!-- ##### SECTION Title ##### -->
+x86
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION orc_x86_emit_add_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_add_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_add_reg_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_align ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_and_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_and_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_cmp_imm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_cmp_reg_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_dec_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_emms ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_epilogue ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_je ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_jle ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_jmp ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_jne ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_label ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@label: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_modrm_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@offset: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_modrm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg1: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_memoffset_mmx ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+@is_aligned: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_memoffset_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_memoffset_sse ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg1: 
+@reg2: 
+@is_aligned: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_mmx_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+@aligned: 
+@uncached: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_mmx_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_mmx_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_mmx ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_reg_sse ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_sse_memoffset ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@offset: 
+@reg2: 
+@aligned: 
+@uncached: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_sse_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_mov_sse_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_pop ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_prologue ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_push ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_ret ##### -->
+<para>
+
+</para>
+
+@compiler: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_rex ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+@reg3: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_sar_imm_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@value: 
+@reg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_sub_memoffset_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@offset: 
+@reg: 
+@destreg: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_sub_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_emit_test_reg_reg ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@size: 
+@reg1: 
+@reg2: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_16 ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_64 ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_mmx ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_ptr ##### -->
+<para>
+
+</para>
+
+@compiler: 
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regname_sse ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
+<!-- ##### FUNCTION orc_x86_get_regnum ##### -->
+<para>
+
+</para>
+
+@i: 
+@Returns: 
+
+
diff --git a/doc/tutorial.xml b/doc/tutorial.xml
new file mode 100644 (file)
index 0000000..c8b8a62
--- /dev/null
@@ -0,0 +1,510 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % version-entities SYSTEM "version.entities">
+%version-entities;
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<refentry id="orc-tutorial" revision="29 may 2009">
+<refmeta>
+<refentrytitle>Orc Tutorial</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>Orc</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Orc Tutorial</refname>
+<refpurpose>
+Getting started writing Orc code.
+</refpurpose>
+</refnamediv>
+
+<refsect1>
+<title>Orc Tutorial</title>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    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.
+  </para>
+
+  <para>
+    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.
+  </para>
+
+</refsect1>
+
+<refsect1>
+<title>Example 1</title>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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".
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  To the code:
+
+<programlisting>
+.function audio_add_s16
+.dest 2 d1
+.source 2 s1
+.source 2 s2
+
+addssw d1, s1, s2
+</programlisting>
+</para>
+
+<para>
+  Line by line:
+
+<programlisting>
+.function audio_add_s16
+</programlisting>
+
+  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.
+
+<programlisting>
+.dest 2 d1 short
+</programlisting>
+
+  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.
+
+<programlisting>
+.source 2 s1 short
+.source 2 s2 short
+</programlisting>
+
+  This specifies that you want two source (input) arrays, "s1" and "s2",
+  similar to the destination array.
+
+<programlisting>
+addssw d1, s1, s2
+</programlisting>
+
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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:
+
+<programlisting>
+/* audio_add_s16 */
+#ifdef DISABLE_ORC
+void
+audio_add_s16 (int16 * d1, const int16 * s1, const int16 * s2, int n)
+{
+  ...
+}
+</programlisting>
+  
+  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.
+
+<programlisting>
+#else
+static void
+_backup_audio_add_s16 (OrcExecutor * ORC_RESTRICT ex)
+{
+  ...
+}
+</programlisting>
+  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.
+
+<programlisting>
+void
+audio_add_s16 (short * d1, const short * s1, const short * s2, int n)
+{
+  ...
+}
+</programlisting>
+
+  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.
+</para>
+
+<para>
+  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():
+
+<programlisting>
+void audio_add_s16 (short * d1, const short * s1, const short * s2, int n);
+</programlisting>
+
+
+</para>
+
+<para>
+  Some C code to generate sample data, call the generated code, and
+  print out the results:
+
+<programlisting>
+#include &lt;stdio.h&gt;
+#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 &lt; 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 &lt; N;i++){
+    printf("%d: %d %d -&gt; %d\n", i, a[i], b[i], c[i]);
+  }
+
+  return 0;
+}
+</programlisting>
+</para>
+
+<para>
+  The output of the program:
+
+<programlisting>
+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
+</programlisting>
+</para>
+
+<para>
+  
+</para>
+
+</refsect1>
+
+<refsect1>
+<title>Example 2</title>
+
+<para>
+  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.
+</para>
+
+<para>
+<programlisting>
+.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
+</programlisting>
+
+  Piece by piece:
+
+<programlisting>
+.function audio_add_mono_to_stereo_scaled_s16
+.dest 4 d1 short
+.source 4 s1 short
+.source 2 s2 short
+</programlisting>
+  
+  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.
+
+<programlisting>
+.param 2 volume
+</programlisting>
+
+  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.
+
+<programlisting>
+.temp 4 s2_scaled
+.temp 2 t
+.temp 4 s2_stereo
+</programlisting>
+
+  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.
+
+<programlisting>
+mulswl s2_scaled, s2, volume
+shrsl s2_scaled, s2_scaled, 12
+</programlisting>
+
+  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.
+
+<programlisting>
+convssslw t, s2_scaled
+mergewl s2_stereo, t, t
+</programlisting>
+
+  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.
+
+<programlisting>
+x2 addssw d1, s1, s2_stereo
+</programlisting>
+
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+
+</refsect1>
+
+<refsect1>
+<title>Example 3</title>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  The code:
+
+<programlisting>
+.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
+</programlisting>
+
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  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.
+</para>
+
+<para>
+  The prototype that is generated is:
+
+<programlisting>
+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);
+</programlisting>
+
+  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().
+</para>
+
+<para>
+  Calling the function:
+
+<programlisting>
+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);
+</programlisting>
+
+</para>
+
+</refsect1>
+
+</refentry>
+
diff --git a/doc/version.entities.in b/doc/version.entities.in
new file mode 100644 (file)
index 0000000..c65557d
--- /dev/null
@@ -0,0 +1,2 @@
+<!ENTITY ORC_MAJORMINOR "@ORC_MAJORMINOR@">
+<!ENTITY ORC_VERSION "@PACKAGE_VERSION@">
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644 (file)
index 0000000..a279d77
--- /dev/null
@@ -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 (file)
index 0000000..90727f1
--- /dev/null
@@ -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 (file)
index 0000000..ee11c1f
--- /dev/null
@@ -0,0 +1,31 @@
+#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;
+}
+
diff --git a/examples/example1orc.orc b/examples/example1orc.orc
new file mode 100644 (file)
index 0000000..6430f70
--- /dev/null
@@ -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 (file)
index 0000000..c2d03e4
--- /dev/null
@@ -0,0 +1,34 @@
+#include <stdio.h>
+#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<N;i++){
+    a[2*i] = 10*i;
+    a[2*i+1] = 100*i;
+    b[i] = (i&1) ? 10000 : -10000;
+  }
+
+  /* Call a function that uses Orc */
+  audio_add_mono_to_stereo_scaled_s16 (c, a, b, volume*4096, N);
+
+  /* Print the results */
+  for(i=0;i<N;i++){
+    printf("%d: %d,%d %d -> %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 (file)
index 0000000..06a4de8
--- /dev/null
@@ -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 (file)
index 0000000..5b04b3f
--- /dev/null
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#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 (file)
index 0000000..2e06a50
--- /dev/null
@@ -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 (file)
index 0000000..a9f736f
--- /dev/null
@@ -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 <stdio.h>
+#include <orc/orc.h>
+#include <stdlib.h>
+#include <string.h>
+#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<N; mti++) {
+        mt[mti] = 
+           (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 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<N-M;kk++) {
+            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
+            mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL];
+        }
+        for (;kk<N-1;kk++) {
+            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
+            mt[kk] = mt[kk+(M-N)] ^ (y >> 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<N; mti++) {
+    mt[mti] = 
+      (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 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<n;kk++) {
+    orc_uint32 t1;
+    orc_uint32 t2;
+
+    t1 = mt[kk]&UPPER_MASK;
+    t2 = mt[kk+1]&LOWER_MASK;
+    y = t1 | t2;
+
+    t1 = y&1;
+    t1 = (t1) ? MATRIX_A : 0;
+    y = y >> 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<N;i++){
+    y = mt[i];
+    y ^= (y >> 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 (file)
index 0000000..3c64358
--- /dev/null
@@ -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 (file)
index 0000000..c8dac72
--- /dev/null
@@ -0,0 +1,269 @@
+
+#include <stdio.h>
+#ifndef _MSC_VER
+#include <sys/time.h>
+#endif
+
+#define ORC_ENABLE_UNSTABLE_API
+
+#include <orc/orc.h>
+
+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<N;i++){
+    dest[i] = 0;
+    samp[i] = i + 1;
+    vols[i] = 0x10000 + i;
+  }
+
+  start = get_timestamp ();
+  for (i = 0; i < TIMES; i++)
+    do_volume_c (dest, vols, samp, N);
+  stop = get_timestamp ();
+  printf ("elapsed C: %d ms\n", (int) (stop - start));
+
+
+  start = get_timestamp ();
+  for (i = 0; i < TIMES; i++)
+    do_volume_orc (dest, vols, samp, N);
+  stop = get_timestamp ();
+  printf ("elapsed ORC: %d ms\n", (int) (stop - start));
+
+  /* Print the results */
+  for(i=0;i<20;i++){
+    printf("%d: %d -> %d\n", i, samp[i], dest[i]);
+  }
+
+  return 0;
+}
diff --git a/gtk-doc.make b/gtk-doc.make
new file mode 100644 (file)
index 0000000..ed8c7a6
--- /dev/null
@@ -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 (executable)
index 0000000..6781b98
--- /dev/null
@@ -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 (executable)
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 <gord@gnu.ai.mit.edu>, 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 <bug-libtool@gnu.org>.
+
+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 <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    $ECHO "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $ECHO "enable shared libraries"
+    else
+      $ECHO "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $ECHO "enable static libraries"
+    else
+      $ECHO "disable static libraries"
+    fi
+
+    exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/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 <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+       # do not "continue".  Instead, add this to base_compile
+       lastarg="$arg"
+       arg_mode=normal
+       ;;
+
+      target )
+       libobj="$arg"
+       arg_mode=normal
+       continue
+       ;;
+
+      normal )
+       # Accept any command-line options.
+       case $arg in
+       -o)
+         test -n "$libobj" && \
+           func_fatal_error "you cannot specify \`-o' more than once"
+         arg_mode=target
+         continue
+         ;;
+
+       -pie | -fpie | -fPIE)
+          pie_flag="$pie_flag $arg"
+         continue
+         ;;
+
+       -shared | -static | -prefer-pic | -prefer-non-pic)
+         later="$later $arg"
+         continue
+         ;;
+
+       -no-suppress)
+         suppress_opt=no
+         continue
+         ;;
+
+       -Xcompiler)
+         arg_mode=arg  #  the next one goes into the "base_compile" arg list
+         continue      #  The current "srcfile" will either be retained or
+         ;;            #  replaced later.  I would guess that would be a bug.
+
+       -Wc,*)
+         func_stripname '-Wc,' '' "$arg"
+         args=$func_stripname_result
+         lastarg=
+         save_ifs="$IFS"; IFS=','
+         for arg in $args; do
+           IFS="$save_ifs"
+           func_quote_for_eval "$arg"
+           lastarg="$lastarg $func_quote_for_eval_result"
+         done
+         IFS="$save_ifs"
+         func_stripname ' ' '' "$lastarg"
+         lastarg=$func_stripname_result
+
+         # Add the arguments to base_compile.
+         base_compile="$base_compile $lastarg"
+         continue
+         ;;
+
+       *)
+         # Accept the current argument as the source file.
+         # The previous "srcfile" becomes the current argument.
+         #
+         lastarg="$srcfile"
+         srcfile="$arg"
+         ;;
+       esac  #  case $arg
+       ;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+       func_basename "$srcfile"
+       libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+       test "$build_libtool_libs" != yes && \
+         func_fatal_configuration "can not build a shared library"
+       build_old_libs=no
+       continue
+       ;;
+
+      -static)
+       build_libtool_libs=no
+       build_old_libs=yes
+       continue
+       ;;
+
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
+      && 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 >/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 <<EOF
+
+/* $cwrappersource - temporary wrapper executable 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 executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "$SHELL $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+           cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+#  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 <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#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 <<EOF
+
+static const char *script_text_part2 =
+EOF
+           func_emit_wrapper_part2 yes |
+               $SED -e 's/\([\\"]\)/\\\1/g' \
+                    -e 's/^/  "/' -e 's/$/\\n"/'
+           echo ";"
+
+           cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+           if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_pathlist "$temp_rpath"
+             cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+           else
+             cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test -n "$dllsearchpath"; then
+              func_to_host_pathlist "$dllsearchpath:"
+             cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+           else
+             cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test "$fast_install" = yes; then
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+           else
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+           fi
+
+
+           cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
+
+static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
+  /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
+  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
+  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+  /* very simple arg parsing; don't want to rely on getopt */
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+       {
+EOF
+           case "$host" in
+             *mingw* | *cygwin* )
+               # make stdout use "unix" line endings
+               echo "          setmode(1,_O_BINARY);"
+               ;;
+             esac
+
+           cat <<"EOF"
+         printf ("%s", script_text_part1);
+         printf ("%s", script_text_part2);
+         return 0;
+       }
+    }
+
+  newargz = XMALLOC (char *, argc + 1);
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal ("Couldn't find %s", argv[0]);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+                         tmp_pathspec));
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+                         actual_cwrapper_path));
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+                         target_name));
+EOF
+
+           cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+                   strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+           cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+           case $host_os in
+             mingw*)
+           cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+       *p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+       *p = '/';
+      }
+  }
+EOF
+           ;;
+           esac
+
+           cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+        {
+          if (argv[i][env_set_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_set_opt_len + 1;
+              lt_opt_process_env_set (p);
+            }
+          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_set (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_set_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+        {
+          if (argv[i][env_prepend_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_prepend_opt_len + 1;
+              lt_opt_process_env_prepend (p);
+            }
+          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_prepend_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+        {
+          if (argv[i][env_append_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_append_opt_len + 1;
+              lt_opt_process_env_append (p);
+            }
+          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_append (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_append_opt);
+          continue;
+        }
+      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal ("Unrecognized option in %s namespace: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  for (i = 0; i < newargc; i++)
+    {
+      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+    }
+
+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 : "<NULL>"),
+                          (value ? value : "<NULL>")));
+  {
+#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 : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  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 : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  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 <<EOF
+         int main() { return 0; }
+EOF
+         $opt_dry_run || $RM conftest
+         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   newdeplibs="$newdeplibs $i"
+                   i=""
+                   ;;
+                 esac
+               fi
+               if test -n "$i" ; then
+                 libname=`eval "\\$ECHO \"$libname_spec\""`
+                 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                 set dummy $deplib_matches; shift
+                 deplib_match=$1
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   newdeplibs="$newdeplibs $i"
+                 else
+                   droppeddeps=yes
+                   $ECHO
+                   $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                   $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 I believe you do not have"
+                   $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+                   $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+                 fi
+               fi
+               ;;
+             *)
+               newdeplibs="$newdeplibs $i"
+               ;;
+             esac
+           done
+         else
+           # Error occurred in the first compile.  Let's try to salvage
+           # the situation: Compile a separate program for each library.
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               $opt_dry_run || $RM conftest
+               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     newdeplibs="$newdeplibs $i"
+                     i=""
+                     ;;
+                   esac
+                 fi
+                 if test -n "$i" ; then
+                   libname=`eval "\\$ECHO \"$libname_spec\""`
+                   deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                   set dummy $deplib_matches; shift
+                   deplib_match=$1
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                     newdeplibs="$newdeplibs $i"
+                   else
+                     droppeddeps=yes
+                     $ECHO
+                     $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                     $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 a test_compile did reveal that the linker did not use this one"
+                     $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+                   fi
+                 fi
+               else
+                 droppeddeps=yes
+                 $ECHO
+                 $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+                 $ECHO "*** make it link in!  You will probably need to install it or some"
+                 $ECHO "*** library that it depends on before this library will be fully"
+                 $ECHO "*** functional.  Installing it before continuing would be even better."
+               fi
+               ;;
+             *)
+               newdeplibs="$newdeplibs $i"
+               ;;
+             esac
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method; shift
+         file_magic_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
+                     # 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 (file)
index 0000000..d0ddb2e
--- /dev/null
@@ -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 (file)
index 0000000..ebb2853
--- /dev/null
@@ -0,0 +1,33 @@
+dnl as-compiler-flag.m4 0.1.0
+
+dnl autostars m4 macro for detection of compiler flags
+
+dnl David Schleef <ds@schleef.org>
+
+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 (file)
index 0000000..d43596f
--- /dev/null
@@ -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 <ds@schleef.org>
+
+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 (file)
index 0000000..119666c
--- /dev/null
@@ -0,0 +1,27 @@
+dnl as-version.m4 0.1.0
+
+dnl autostars m4 macro for versioning (modified)
+
+dnl Thomas Vander Stichele <thomas at apestaart dot org>
+dnl David Schleef <ds@schleef.org>
+
+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 (file)
index 0000000..13bf699
--- /dev/null
@@ -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 <stdint.h>" section requires the
+#   existence of an include file <stdint.h> 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 <inttypes.h>. In other enviroments we can
+#   use the inet-types in <sys/types.h> 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
+#   <stdint.h>" or "#include <inttypes.h>", 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 <mylib-int.h>" to
+#   obtain the stdint-types.
+#
+#   Remember, if the system already had a valid <stdint.h>, 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 <guidod@gmx.de>
+#
+#   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 <stdint.h>],[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 <stdint.h>],[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 <stdint.h>" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+else
+
+cat >>$ac_stdint <<STDINT_EOF
+
+/* ................... shortcircuit part ........................... */
+
+#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <stddef.h>
+
+/* .................... 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 <<STDINT_EOF
+/* .................... detections part ............................ */
+
+/* whether we need to define bitspecific types from compiler base types */
+#ifndef _STDINT_HEADER_INTPTR
+#ifndef _STDINT_HEADER_UINT32
+#ifndef _STDINT_HEADER_U_INT32
+#define _STDINT_NEED_INT_MODEL_T
+#else
+#define _STDINT_HAVE_U_INT_TYPES
+#endif
+#endif
+#endif
+
+#ifdef _STDINT_HAVE_U_INT_TYPES
+#undef _STDINT_NEED_INT_MODEL_T
+#endif
+
+#ifdef  _STDINT_CHAR_MODEL
+#if     _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
+#ifndef _STDINT_BYTE_MODEL
+#define _STDINT_BYTE_MODEL 12
+#endif
+#endif
+#endif
+
+#ifndef _STDINT_HAVE_INT_LEAST32_T
+#define _STDINT_NEED_INT_LEAST_T
+#endif
+
+#ifndef _STDINT_HAVE_INT_FAST32_T
+#define _STDINT_NEED_INT_FAST_T
+#endif
+
+#ifndef _STDINT_HEADER_INTPTR
+#define _STDINT_NEED_INTPTR_T
+#ifndef _STDINT_HAVE_INTMAX_T
+#define _STDINT_NEED_INTMAX_T
+#endif
+#endif
+
+
+/* .................... definition part ............................ */
+
+/* some system headers have good uint64_t */
+#ifndef _HAVE_UINT64_T
+#if     defined _STDINT_HAVE_UINT64_T  || defined HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#elif   defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
+#define _HAVE_UINT64_T
+typedef u_int64_t uint64_t;
+#endif
+#endif
+
+#ifndef _HAVE_UINT64_T
+/* .. here are some common heuristics using compiler runtime specifics */
+#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 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 (file)
index 0000000..2cfa1e7
--- /dev/null
@@ -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 (file)
index 0000000..a3fee53
--- /dev/null
@@ -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:
+#
+#    <var>='`$ECHO "X$<var>" | $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 <bug-libtool@gnu.org>."
+
+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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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<name>.so
+      # instead of lib<name>.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 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+      *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+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
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[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
+])
+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 <jrb3@best.com> 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 <jrb3@best.com> 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 (file)
index 0000000..34151a3
--- /dev/null
@@ -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 (file)
index 0000000..9000a05
--- /dev/null
@@ -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 (file)
index 0000000..f3c5309
--- /dev/null
@@ -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 (file)
index 0000000..637bb20
--- /dev/null
@@ -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 (file)
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 <scott@netsplit.com>.
+#
+# 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 <http://www.freedesktop.org/software/pkgconfig>.])],
+               [$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 (executable)
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 <pinard@iro.umontreal.ca>, 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org>."
+    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 (file)
index 0000000..0493334
--- /dev/null
@@ -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 (file)
index 0000000..ffb5f99
--- /dev/null
@@ -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 (file)
index 0000000..0686008
--- /dev/null
@@ -0,0 +1,301 @@
+
+#include <orc-test/orctest.h>
+#include <orc-test/orcarray.h>
+#include <orc-test/orcrandom.h>
+#include <orc/orc.h>
+#include <orc/orcutils.h>
+#include <orc/orcdebug.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+
+#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;j<array->m;j++){
+          orc_union32 *data;
+          int exp;
+
+          data = ORC_PTR_OFFSET(array->data, array->stride * j);
+
+          for(i=0;i<array->n;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;j<array->m;j++){
+          orc_union32 *data;
+          int x;
+
+          data = ORC_PTR_OFFSET(array->data, array->stride * j);
+
+          for(i=0;i<array->n;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;j<array->m;j++){
+          orc_union32 *data;
+
+          data = ORC_PTR_OFFSET(array->data, array->stride * j);
+
+          for(i=0;i<array->n;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;j<array1->m;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;i<array1->n;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;j<array1->m;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;i<array1->n;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;i<array->stride * 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;j<array->m;j++){
+    data = ORC_PTR_OFFSET(array->data, array->stride * j);
+    for(i=array->element_size * array->n;i<array->stride;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;i<array->stride * 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;j<array1->m;j++){
+    for(i=0;i<array1->n;i++){
+      int a,b;
+      int j;
+
+      printf("%2d %2d:", i, j);
+
+      for(k=0;k<ORC_N_VARIABLES;k++){
+        if (program->vars[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 (file)
index 0000000..eb57c57
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef _ORC_ARRAY_H_
+#define _ORC_ARRAY_H_
+
+#include <orc-test/orctest.h>
+#include <orc-test/orcrandom.h>
+#include <orc/orc.h>
+#include <orc/orcdebug.h>
+
+#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 (file)
index 0000000..85de41b
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * Orc - Oil Runtime Compiler
+ * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
+ * 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 <orc-test/orcprofile.h>
+#include <orc/orcdebug.h>
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <time.h>
+#include <string.h>
+#include <math.h>
+
+/* 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;i<prof->hist_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 (file)
index 0000000..277fd59
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Orc - Oil Runtime Compiler
+ * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
+ * 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/orcutils.h>
+
+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 (file)
index 0000000..0f53963
--- /dev/null
@@ -0,0 +1,47 @@
+
+#include "config.h"
+
+#include <orc-test/orctest.h>
+#include <orc-test/orcrandom.h>
+#include <orc/orc.h>
+#include <orc/orcdebug.h>
+
+
+
+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;i<n_bytes;i++){
+    context->x = 1103515245*context->x + 12345;
+    d[i] = context->x>>16;
+  }
+}
+
+void
+orc_random_floats (OrcRandomContext *context, float *data, int n)
+{
+  int i;
+  for(i=0;i<n;i++){
+    context->x = 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 (file)
index 0000000..757b982
--- /dev/null
@@ -0,0 +1,22 @@
+
+#ifndef _ORC_RANDOM_H_
+#define _ORC_RANDOM_H_
+
+#include <orc/orcutils.h>
+
+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 (file)
index 0000000..0feba6d
--- /dev/null
@@ -0,0 +1,1039 @@
+
+#include "config.h"
+
+#include <orc-test/orctest.h>
+#include <orc-test/orcarray.h>
+#include <orc-test/orcrandom.h>
+#include <orc-test/orcprofile.h>
+#include <orc/orc.h>
+#include <orc/orcdebug.h>
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#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;i<n_bytes;i++){
+    d[i] = rand();
+  }
+#endif
+#if 0
+  float *d = data;
+  int i;
+  for(i=0;i<n_bytes/4;i++){
+    d[i] = ((rand() & 0xffff)-32768)*0.01;
+  }
+#endif
+}
+
+static orc_uint64
+print_array_val_signed (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(" %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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[i].vartype == ORC_VAR_TYPE_ACCUMULATOR) {
+      acc_exec = ex->accumulators[0];
+      have_acc = TRUE;
+    }
+  }
+
+  for(i=0;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[i].vartype == ORC_VAR_TYPE_ACCUMULATOR) {
+      acc_emul = ex->accumulators[0];
+    }
+  }
+
+  for(k=ORC_VAR_D1;k<ORC_VAR_D1+4;k++){
+    if (program->vars[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;j<m;j++){
+      for(i=0;i<n;i++){
+        orc_uint64 a,b;
+        int l;
+        int line_bad = 0;
+
+        printf("%2d %2d:", i, j);
+
+        for(l=ORC_VAR_S1;l<ORC_VAR_S1+8;l++){
+          if (program->vars[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;l<ORC_VAR_D1+4;l++){
+          if (program->vars[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;j<m;j++){
+        for(i=0;i<n;i++){
+
+          printf("%2d %2d:", i, j);
+
+          for(k=0;k<ORC_N_VARIABLES;k++){
+            if (program->vars[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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;j<ORC_N_VARIABLES;j++){
+      if (program->vars[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 (file)
index 0000000..53d15c9
--- /dev/null
@@ -0,0 +1,40 @@
+
+#ifndef _ORC_TEST_TEST_H_
+#define _ORC_TEST_TEST_H_
+
+#include <orc/orc.h>
+#include <orc/orcutils.h>
+
+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 (file)
index 0000000..7c18fc4
--- /dev/null
@@ -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 (file)
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 (file)
index 0000000..32b9252
--- /dev/null
@@ -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 (file)
index 0000000..3822530
--- /dev/null
@@ -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 (file)
index 0000000..f375c04
--- /dev/null
@@ -0,0 +1,343 @@
+
+#include "config.h"
+
+#include <orc/orc.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+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;i<argc;i++) {
+    if (strcmp (argv[i], "--output") == 0 ||
+        strcmp(argv[i], "-o") == 0) {
+      if (i+1 < argc) {
+        output_file = argv[i+1];
+        i++;
+      } else {
+        help();
+      }
+    } else if (strcmp (argv[i], "--header") == 0) {
+      output_header = TRUE;
+    } else if (strncmp(argv[i], "-", 1) == 0) {
+      printf("Unknown option: %s\n", argv[i]);
+      exit (1);
+    } else {
+      if (input_file == NULL) {
+        input_file = argv[i];
+      } else {
+        printf("More than one input file specified: %s\n", argv[i]);
+        exit (1);
+      }
+    }
+  }
+
+  if (output_file == NULL) {
+    output_file = "out.c";
+  }
+
+  output = fopen (output_file, "w");
+  if (!output) {
+    printf("Could not write output file: %s\n", output_file);
+    exit(1);
+  }
+
+  opcode_set = orc_opcode_set_get ("sys");
+
+  fprintf(output, "\n");
+  fprintf(output, "/* autogenerated by generate-emulation */\n");
+  fprintf(output, "\n");
+
+  if (output_header) {
+    fprintf(output, "#ifndef _ORC_EMULATE_OPCODES_H_\n");
+    fprintf(output, "#define _ORC_EMULATE_OPCODES_H_\n");
+    fprintf(output, "\n");
+    for(i=0;i<opcode_set->n_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 <math.h>\n");
+    fprintf(output, "#include <orc/orc.h>\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;i<opcode_set->n_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 (file)
index 0000000..b05cc6e
--- /dev/null
@@ -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 (file)
index 0000000..d90abe9
--- /dev/null
+++ b/orc/orc.c
@@ -0,0 +1,62 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+/**
+ * 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 (file)
index 0000000..3f711be
--- /dev/null
+++ b/orc/orc.h
@@ -0,0 +1,20 @@
+
+#ifndef _ORC_ORC_H_
+#define _ORC_ORC_H_
+
+#include <orc/orcprogram.h>
+#include <orc/orc-stdint.h>
+#include <orc/orcarm.h>
+#include <orc/orcdebug.h>
+#include <orc/orcfunctions.h>
+#include <orc/orcmmx.h>
+#include <orc/orconce.h>
+#include <orc/orcparse.h>
+#include <orc/orcprogram.h>
+#include <orc/orcsse.h>
+#include <orc/orcutils.h>
+#include <orc/orcx86.h>
+#include <orc/orcpowerpc.h>
+
+#endif
+
diff --git a/orc/orcarm.c b/orc/orcarm.c
new file mode 100644 (file)
index 0000000..bfdc246
--- /dev/null
@@ -0,0 +1,741 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcdebug.h>
+#include <orc/orcprogram.h>
+#include <orc/orcarm.h>
+#include <orc/orcutils.h>
+
+/**
+ * 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<<i)) {
+      x |= (1<<i);
+      ORC_ASM_CODE(compiler,"r%d", i);
+      if (x != regs) {
+        ORC_ASM_CODE(compiler,", ");
+      }
+    }
+  }
+  ORC_ASM_CODE(compiler,"}\n");
+
+  orc_arm_emit (compiler, 0xe92d0000 | regs);
+}
+
+void
+orc_arm_emit_pop (OrcCompiler *compiler, int regs)
+{
+  int i;
+  int x = 0;
+
+  ORC_ASM_CODE(compiler,"  pop {");
+  for(i=0;i<16;i++){
+    if (regs & (1<<i)) {
+      x |= (1<<i);
+      ORC_ASM_CODE(compiler,"r%d", i);
+      if (x != regs) {
+        ORC_ASM_CODE(compiler,", ");
+      }
+    }
+  }
+  ORC_ASM_CODE(compiler,"}\n");
+
+  orc_arm_emit (compiler, 0xe8bd0000 | regs);
+}
+
+void
+orc_arm_emit_label (OrcCompiler *compiler, int label)
+{
+  ORC_ASSERT (label < ORC_N_LABELS);
+
+  ORC_ASM_CODE(compiler,".L%d:\n", label);
+
+  compiler->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;i<compiler->n_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<<align_shift) - 1);
+  while (diff) {
+    orc_arm_emit_nop (compiler);
+    diff-=4;
+  }
+}
+
+void
+orc_arm_emit_nop (OrcCompiler *compiler)
+{
+  ORC_ASM_CODE(compiler,"  nop\n");
+  orc_arm_emit (compiler, 0xe1a00000);
+}
+
+void
+orc_arm_emit_branch (OrcCompiler *compiler, int cond, int label)
+{
+  orc_uint32 code;
+
+  code = 0x0afffffe;
+  code |= (cond&0xf) << 28;
+  orc_arm_add_fixup (compiler, label, 0);
+  orc_arm_emit (compiler, code);
+
+  ORC_ASM_CODE(compiler,"  b%s .L%d\n", orc_arm_cond_name(cond), label);
+}
+
+void
+orc_arm_emit_load_imm (OrcCompiler *compiler, int dest, 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 = 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:  <op>{<cond>}{s} {<Rd>}, <Rn>, #imm   (imm = (val>>(shift*2))|(val<<(32-(shift*2))))
+ * type 1:  <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm>
+ * type 2:  <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm>, [LSL|LSR|ASR] #imm
+ * type 3:  <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm>, [LSL|LSR|ASR] <Rs>
+ * type 4:  <op>{<cond>}{s} {<Rd>,} <Rn>, <Rm>, 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:
+      /* <Rm> */
+      shifter_op = arm_so_r (Rm);
+      sprintf (shifter, "%s", orc_arm_reg_name (Rm));
+      break;
+    case 2:
+      /* <Rm>, [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:
+      /* <Rm>, [LSL|LSR|ASR] <Rs> */
+      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:
+      /* <Rm>, 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 (file)
index 0000000..9d53040
--- /dev/null
@@ -0,0 +1,322 @@
+
+#ifndef _ORC_ARM_H_
+#define _ORC_ARM_H_
+
+#include <orc/orcprogram.h>
+
+
+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 */
+/* <op>{<cond>}{s} {<Rd>}, <Rn>, #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)
+
+/* <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm> */
+#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)
+
+/* <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm>, [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)
+
+/* <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm>, [LSL|LSR|ASR] <Rs> */
+#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)
+
+/* <op>{<cond>}{s} {<Rd>,} <Rn>, <Rm>, 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 (file)
index 0000000..ca5946c
--- /dev/null
@@ -0,0 +1,41 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+
+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 (file)
index 0000000..eee7f2f
--- /dev/null
@@ -0,0 +1,295 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#ifdef HAVE_CODEMEM_MMAP
+#include <sys/mman.h>
+#endif
+#ifdef HAVE_CODEMEM_VIRTUALALLOC
+#include <windows.h>
+#endif
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+
+#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;i<orc_code_n_regions;i++){
+    region = orc_code_regions[i];
+    for(chunk = region->chunks; 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 (file)
index 0000000..a9b2ada
--- /dev/null
@@ -0,0 +1,1171 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+#ifdef HAVE_VALGRIND_VALGRIND_H
+#include <valgrind/valgrind.h>
+#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;i<ORC_N_VARIABLES;i++){
+      if (program->vars[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;i<program->n_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;i<ORC_N_VARIABLES;i++){
+      if (compiler->vars[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;i<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    program->orccode->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;i<compiler->n_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;i<compiler->n_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;i<compiler->n_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;j<ORC_STATIC_OPCODE_N_DEST;j++){
+      if (opcode->dest_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;j<ORC_STATIC_OPCODE_N_SRC;j++){
+      if (opcode->src_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;j<program->n_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;i<ORC_STATIC_OPCODE_N_SRC;i++){
+        OrcVariable *var;
+
+        if (opcode->src_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;i<ORC_STATIC_OPCODE_N_DEST;i++){
+        OrcVariable *var;
+
+        if (opcode->dest_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;i<compiler->n_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;j<ORC_N_REGS;j++){
+    compiler->alloc_regs[j] = 0;
+  }
+  for(j=0;j<ORC_N_COMPILER_VARIABLES;j++){
+    if (!compiler->vars[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;j<compiler->n_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;j<ORC_VEC_REG_BASE+16;j++){
+    if (compiler->valid_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;j<ORC_N_COMPILER_VARIABLES;j++){
+    if (compiler->vars[j].alloc) continue;
+    compiler->vars[j].last_use = -1;
+  }
+  for(j=0;j<compiler->n_insns;j++){
+    insn = compiler->insns + j;
+    opcode = insn->opcode;
+
+    /* set up args */
+    for(k=0;k<ORC_STATIC_OPCODE_N_SRC;k++){
+      if (opcode->src_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;k<ORC_STATIC_OPCODE_N_DEST;k++){
+      if (opcode->dest_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    var = compiler->vars + 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;i<compiler->n_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;j<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+      if (compiler->vars[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;i<ORC_N_COMPILER_VARIABLES;i++){
+      if (compiler->vars[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;i<compiler->n_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;i<compiler->n_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;i<compiler->n_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;j<ORC_N_REGS;j++){
+    compiler->alloc_regs[j] = 0;
+  }
+  for(j=0;j<ORC_N_COMPILER_VARIABLES;j++){
+    if (!compiler->vars[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;j<compiler->n_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;j<ORC_VEC_REG_BASE+16;j++){
+    if (compiler->valid_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 (file)
index 0000000..cb013c3
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * ORC - Oil Runtime Compiler
+ * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
+ * 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 <orc/orcarm.h>
+#include <orc/orcutils.h>
+#include <orc/orcdebug.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <time.h>
+#if defined(__linux__)
+#include <linux/auxvec.h>
+#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 (file)
index 0000000..93c9910
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+ * LIBORC - Library of Optimized Inner Loops
+ * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
+ * 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 <orc/orc.h>
+
+#if defined(__linux__)
+#include <linux/auxvec.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#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 <sys/types.h>
+#include <sys/sysctl.h>
+#endif
+
+#if defined(__OpenBSD__)
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <machine/cpu.h>
+#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 (file)
index 0000000..b71e6da
--- /dev/null
@@ -0,0 +1,557 @@
+/*
+ * ORC - Library of Optimized Inner Loops
+ * Copyright (c) 2003,2004,2010 David A. Schleef <ds@schleef.org>
+ * 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 <orc/orcdebug.h>
+#include <orc/orcsse.h>
+#include <orc/orcmmx.h>
+#include <orc/orcprogram.h>
+#include <orc/orcutils.h>
+
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <time.h>
+
+
+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<sizeof(cache_descriptors)/sizeof(cache_descriptors[0]);i++){
+    if (desc == cache_descriptors[i].desc) {
+      ORC_DEBUG("level %d size %d", cache_descriptors[i].level,
+          cache_descriptors[i].size);
+      switch (cache_descriptors[i].level) {
+        case 1:
+          _orc_data_cache_size_level1 = cache_descriptors[i].size;
+          break;
+        case 2:
+          _orc_data_cache_size_level2 = cache_descriptors[i].size;
+          break;
+        case 3:
+          _orc_data_cache_size_level3 = cache_descriptors[i].size;
+          break;
+      }
+    }
+  }
+}
+
+static void orc_sse_detect_cpuid_intel (orc_uint32 level);
+static void orc_sse_detect_cpuid_amd (orc_uint32 level);
+static void orc_sse_detect_cpuid_generic (orc_uint32 level);
+
+static void
+orc_x86_detect_cpuid (void)
+{
+  static int inited = 0;
+  orc_uint32 ebx, edx;
+  orc_uint32 level;
+
+  if (inited) return;
+  inited = 1;
+
+  get_cpuid (0x00000000, &level, &ebx, &orc_x86_vendor, &edx);
+
+  ORC_DEBUG("cpuid %d %08x %08x %08x", level, ebx, edx, orc_x86_vendor);
+
+#define ORC_X86_GenuineIntel (('n'<<0)|('t'<<8)|('e'<<16)|('l'<<24))
+#define ORC_X86_AuthenticAMD (('c'<<0)|('A'<<8)|('M'<<16)|('D'<<24))
+#define ORC_X86_CentaurHauls (('a'<<0)|('u'<<8)|('l'<<16)|('s'<<24))
+#define ORC_X86_CyrixInstead (('t'<<0)|('e'<<8)|('a'<<16)|('d'<<24))
+#define ORC_X86_GenuineTMx86 (('M'<<0)|('x'<<8)|('8'<<16)|('6'<<24))
+#define ORC_X86_Geode_by_NSC ((' '<<0)|('N'<<8)|('S'<<16)|('6'<<24))
+#define ORC_X86_NexGenDriven (('i'<<0)|('v'<<8)|('e'<<16)|('n'<<24))
+#define ORC_X86_RiseRiseRise (('R'<<0)|('i'<<8)|('s'<<16)|('e'<<24))
+#define ORC_X86_SiS_SiS_SiS_ (('S'<<0)|('i'<<8)|('S'<<16)|(' '<<24))
+#define ORC_X86_UMC_UMC_UMC_ (('U'<<0)|('M'<<8)|('C'<<16)|(' '<<24))
+#define ORC_X86_VIA_VIA_VIA_ (('V'<<0)|('I'<<8)|('A'<<16)|(' '<<24))
+
+  switch (orc_x86_vendor) {
+    case ORC_X86_GenuineIntel:
+      orc_sse_detect_cpuid_intel (level);
+      break;
+    case ORC_X86_AuthenticAMD:
+      orc_sse_detect_cpuid_amd (level);
+      break;
+    default:
+      ORC_INFO("unhandled vendor %08x %08x %08x", ebx, edx, orc_x86_vendor);
+      orc_sse_detect_cpuid_generic (level);
+      break;
+  }
+
+  if (orc_compiler_flag_check ("-sse2")) {
+    orc_x86_sse_flags &= ~ORC_TARGET_SSE_SSE2;
+  }
+  if (orc_compiler_flag_check ("-sse3")) {
+    orc_x86_sse_flags &= ~ORC_TARGET_SSE_SSE3;
+  }
+  if (orc_compiler_flag_check ("-ssse3")) {
+    orc_x86_sse_flags &= ~ORC_TARGET_SSE_SSSE3;
+  }
+  if (orc_compiler_flag_check ("-sse41")) {
+    orc_x86_sse_flags &= ~ORC_TARGET_SSE_SSE4_1;
+  }
+  if (orc_compiler_flag_check ("-sse42")) {
+    orc_x86_sse_flags &= ~ORC_TARGET_SSE_SSE4_2;
+  }
+  if (orc_compiler_flag_check ("-sse4a")) {
+    orc_x86_sse_flags &= ~ORC_TARGET_SSE_SSE4A;
+  }
+  if (orc_compiler_flag_check ("-sse5")) {
+    orc_x86_sse_flags &= ~ORC_TARGET_SSE_SSE5;
+  }
+
+}
+
+char orc_x86_processor_string[49];
+
+static void
+orc_x86_cpuid_get_branding_string (void)
+{
+  get_cpuid (0x80000002,
+      (orc_uint32 *)(orc_x86_processor_string+0),
+      (orc_uint32 *)(orc_x86_processor_string+4),
+      (orc_uint32 *)(orc_x86_processor_string+8),
+      (orc_uint32 *)(orc_x86_processor_string+12));
+  get_cpuid (0x80000003,
+      (orc_uint32 *)(orc_x86_processor_string+16),
+      (orc_uint32 *)(orc_x86_processor_string+20),
+      (orc_uint32 *)(orc_x86_processor_string+24),
+      (orc_uint32 *)(orc_x86_processor_string+28));
+  get_cpuid (0x80000004,
+      (orc_uint32 *)(orc_x86_processor_string+32),
+      (orc_uint32 *)(orc_x86_processor_string+36),
+      (orc_uint32 *)(orc_x86_processor_string+40),
+      (orc_uint32 *)(orc_x86_processor_string+44));
+
+  ORC_INFO ("processor string '%s'", orc_x86_processor_string);
+
+  _orc_cpu_name = orc_x86_processor_string;
+}
+
+static void
+orc_x86_cpuid_handle_standard_flags (void)
+{
+  orc_uint32 eax, ebx, ecx, edx;
+
+  get_cpuid (0x00000001, &eax, &ebx, &ecx, &edx);
+
+  if (edx & (1<<23)) {
+    orc_x86_mmx_flags |= ORC_TARGET_MMX_MMX;
+  }
+  if (edx & (1<<26)) {
+    orc_x86_sse_flags |= ORC_TARGET_SSE_SSE2;
+    orc_x86_mmx_flags |= ORC_TARGET_MMX_MMXEXT;
+  }
+  if (ecx & (1<<0)) {
+    orc_x86_sse_flags |= ORC_TARGET_SSE_SSE3;
+  }
+  if (ecx & (1<<9)) {
+    orc_x86_sse_flags |= ORC_TARGET_SSE_SSSE3;
+    orc_x86_mmx_flags |= ORC_TARGET_MMX_SSSE3;
+  }
+  if (ecx & (1<<19)) {
+    orc_x86_sse_flags |= ORC_TARGET_SSE_SSE4_1;
+    orc_x86_mmx_flags |= ORC_TARGET_MMX_SSE4_1;
+  }
+  if (ecx & (1<<20)) {
+    orc_x86_sse_flags |= ORC_TARGET_SSE_SSE4_2;
+  }
+}
+
+static void
+orc_x86_cpuid_handle_family_model_stepping (void)
+{
+  orc_uint32 eax, ebx, ecx, edx;
+  int family_id;
+  int model_id;
+  int ext_family_id;
+  int ext_model_id;
+
+  get_cpuid (0x00000001, &eax, &ebx, &ecx, &edx);
+
+  family_id = (eax>>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 (file)
index 0000000..c4aa7be
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * ORC - Library of Optimized Inner Loops
+ * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
+ * 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 <orc/orcdebug.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+/**
+ * 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 (file)
index 0000000..fe09605
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * ORC - Library of Optimized Inner Loops
+ * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
+ * 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 <stdarg.h>
+#include <orc/orcutils.h>
+
+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 (file)
index 0000000..c618eee
--- /dev/null
@@ -0,0 +1,5320 @@
+
+/* autogenerated by generate-emulation */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <math.h>
+#include <orc/orc.h>
+
+
+/* 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 (file)
index 0000000..b02050e
--- /dev/null
@@ -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 (file)
index 0000000..2713029
--- /dev/null
@@ -0,0 +1,371 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+/**
+ * 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;l<CHUNK_SIZE;l++) {
+          d[l] = value;
+        }
+      }
+      break;
+    case 2:
+      {
+        int l;
+        orc_int16 *d = data;
+        for(l=0;l<CHUNK_SIZE;l++) {
+          d[l] = value;
+        }
+      }
+      break;
+    case 4:
+      {
+        int l;
+        orc_int32 *d = data;
+        for(l=0;l<CHUNK_SIZE;l++) {
+          d[l] = value;
+        }
+      }
+      break;
+    case 8:
+      {
+        int l;
+        orc_int64 *d = data;
+        for(l=0;l<CHUNK_SIZE;l++) {
+          d[l] = value;
+        }
+      }
+      break;
+    default:
+      ORC_ASSERT(0);
+  }
+
+}
+
+
+void
+orc_executor_emulate (OrcExecutor *ex)
+{
+  int i;
+  int j;
+  int k;
+  int m, m_index;
+  OrcCode *code = ex->program->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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcCodeVariable *var = code->vars + i;
+
+    if (var->size) {
+      tmpspace[i] = malloc(ORC_MAX_VAR_SIZE * CHUNK_SIZE);
+    }
+  }
+
+  opcode_ex = malloc(sizeof(OrcOpcodeExecutor)*code->n_insns);
+
+  for(j=0;j<code->n_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;k<ORC_STATIC_OPCODE_N_SRC;k++) {
+      OrcCodeVariable *var = code->vars + 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;k<ORC_STATIC_OPCODE_N_DEST;k++) {
+      OrcCodeVariable *var = code->vars + 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_index<m;m_index++){
+    ORC_DEBUG("m_index %d m %d", m_index, m);
+
+    for(j=0;j<code->n_insns;j++){
+      insn = code->insns + j;
+      opcode = insn->opcode;
+
+      for(k=0;k<ORC_STATIC_OPCODE_N_SRC;k++) {
+        OrcCodeVariable *var = code->vars + 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;k<ORC_STATIC_OPCODE_N_DEST;k++) {
+        OrcCodeVariable *var = code->vars + 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;i<ex->n;i+=CHUNK_SIZE){
+      for(j=0;j<code->n_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<ORC_N_COMPILER_VARIABLES;i++){
+    if (tmpspace[i]) free (tmpspace[i]);
+  }
+}
+
+
diff --git a/orc/orcfunctions.c b/orc/orcfunctions.c
new file mode 100644 (file)
index 0000000..1151756
--- /dev/null
@@ -0,0 +1,276 @@
+
+/* autogenerated from orcfunctions.orc */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifndef DISABLE_ORC
+#include <orc/orc.h>
+#endif
+
+#ifndef _ORC_INTEGER_TYPEDEFS_
+#define _ORC_INTEGER_TYPEDEFS_
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <stdint.h>
+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 <limits.h>
+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 (file)
index 0000000..07f5265
--- /dev/null
@@ -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 <stdint.h>
+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 <limits.h>
+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 (file)
index 0000000..a82678f
--- /dev/null
@@ -0,0 +1,264 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+#include <orc/orcmmx.h>
+
+/**
+ * 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 && i<X86_MM0 + 16) return x86_regs[i - X86_MM0];
+  switch (i) {
+    case 0:
+      return "UNALLOCATED";
+    case 1:
+      return "direct";
+    default:
+      return "ERROR";
+  }
+}
+
+void
+orc_mmx_emit_f20f (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++ = 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<<shift,
+          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,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1),
+          orc_x86_get_regname_ptr(compiler, regindex), 1<<shift,
+          orc_x86_get_regname_mmx(reg2));
+      orc_x86_emit_rex(compiler, 0, reg2, 0, reg1);
+      *compiler->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 (file)
index 0000000..c299e2f
--- /dev/null
@@ -0,0 +1,211 @@
+
+#ifndef _ORC_MMX_H_
+#define _ORC_MMX_H_
+
+#include <orc/orcx86.h>
+
+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 (file)
index 0000000..81fde4d
--- /dev/null
@@ -0,0 +1,36 @@
+
+#ifndef _ORC_NEON_H_
+#define _ORC_NEON_H_
+
+#include <orc/orc.h>
+#include <orc/orcarm.h>
+
+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 (file)
index 0000000..aa432fb
--- /dev/null
@@ -0,0 +1,114 @@
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <orc/orconce.h>
+#include <orc/orcdebug.h>
+
+#if defined(HAVE_THREAD_PTHREAD)
+
+#include <pthread.h>
+
+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 <windows.h>
+
+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 (file)
index 0000000..a4689a9
--- /dev/null
@@ -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 (file)
index 0000000..eda8610
--- /dev/null
@@ -0,0 +1,511 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+/**
+ * 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;i<n_targets;i++){
+    if (strcmp (name, targets[i]->name) == 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<n_opcode_sets;k++){
+    j = opcode - opcode_sets[k].opcodes;
+
+    if (j < 0 || j >= 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;i<n_opcode_sets;i++){
+    if (strcmp (opcode_sets[i].prefix, name) == 0) {
+      return opcode_sets + i;
+    }
+  }
+
+  return NULL;
+}
+
+OrcOpcodeSet *
+orc_opcode_set_get_nth (int opcode_major)
+{
+  return opcode_sets + opcode_major;
+}
+
+int
+orc_opcode_set_find_by_name (OrcOpcodeSet *opcode_set, const char *name)
+{
+  int j;
+
+  for(j=0;j<opcode_set->n_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<n_opcode_sets;i++){
+    j = orc_opcode_set_find_by_name (opcode_sets + i, name);
+    if (j >= 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 (file)
index 0000000..7c29780
--- /dev/null
@@ -0,0 +1,429 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <orc/orc.h>
+#include <orc/orcparse.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+/**
+ * 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;i<n_tokens;i++){
+        //printf("'%s' ", token[i]);
+      }
+      //printf("\n");
+    }
+
+    if (token[0][0] == '.') {
+      if (strcmp (token[0], ".function") == 0) {
+        if (parser->program) {
+          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;i<n_tokens;i++){
+          if (!strcmp (token[i], "2d")) {
+            orc_program_set_2d (parser->program);
+          }
+        }
+      } 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;i<n_tokens;i++){
+          char *end;
+          double d;
+          d = strtod (token[i], &end);
+          if (end != token[i]) {
+            orc_program_add_constant_str (parser->program, 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;i<parser->opcode_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;i<ORC_STATIC_OPCODE_N_DEST;i++){
+    if (opcode->dest_size[i] != 0) n++;
+  }
+  for(i=0;i<ORC_STATIC_OPCODE_N_SRC;i++){
+    if (opcode->src_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;i<program->n_insns;i++){
+    OrcInstruction *insn = program->insns + i;
+    OrcStaticOpcode *opcode = insn->opcode;
+
+    for(j=0;j<ORC_STATIC_OPCODE_N_DEST;j++){
+      if (opcode->dest_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;j<ORC_STATIC_OPCODE_N_SRC;j++){
+      if (opcode->src_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 (file)
index 0000000..b95a267
--- /dev/null
@@ -0,0 +1,16 @@
+
+#ifndef __ORC_PARSE_H__
+#define __ORC_PARSE_H__
+
+#include <orc/orcutils.h>
+
+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 (file)
index 0000000..f813109
--- /dev/null
@@ -0,0 +1,632 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcpowerpc.h>
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+/**
+ * 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 && i<ORC_GP_REG_BASE + 64) {
+    return powerpc_regs[i - ORC_GP_REG_BASE];
+  }
+  switch (i) {
+    case 0:
+      return "UNALLOCATED";
+    case 1:
+      return "direct";
+    default:
+      return "ERROR";
+  }
+}
+
+int
+powerpc_regnum (int i)
+{
+  return (i-ORC_GP_REG_BASE)&0x1f;
+}
+
+void
+powerpc_emit(OrcCompiler *compiler, unsigned int insn)
+{
+  *compiler->codeptr++ = (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;i<compiler->n_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;i<size;i+=cache_line_size) {
+    __asm__ __volatile__ ("dcbst %0,%1" :: "r" (ptr), "r" (i));
+  }
+  __asm__ __volatile ("sync");
+
+  ptr = (void *)code->exec;
+  for (i=0;i<size;i+=cache_line_size) {
+    __asm__ __volatile__ ("icbi %0,%1" :: "r" (ptr), "r" (i));
+  }
+  __asm__ __volatile ("isync");
+#endif
+}
+
+static void
+powerpc_load_constant (OrcCompiler *p, int i, int reg)
+{
+  int j;
+  int value = p->constants[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;i<p->n_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;i<p->n_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 (file)
index 0000000..5a85a47
--- /dev/null
@@ -0,0 +1,173 @@
+
+#ifndef _ORC_POWERPC_H_
+#define _ORC_POWERPC_H_
+
+#include <orc/orcprogram.h>
+
+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 (file)
index 0000000..5f1755b
--- /dev/null
@@ -0,0 +1,400 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcpowerpc.h>
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+
+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;i<ORC_N_COMPILER_VARIABLES;i++){
+    var = compiler->vars + 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;j<compiler->n_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;j<compiler->n_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;k<opcode->n_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;k<ORC_STATIC_OPCODE_N_SRC;k++){
+      OrcVariable *var = compiler->vars + 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;k<ORC_STATIC_OPCODE_N_DEST;k++){
+      OrcVariable *var = compiler->vars + 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;k<ORC_N_COMPILER_VARIABLES;k++){
+    if (compiler->vars[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;k<ORC_N_COMPILER_VARIABLES;k++){
+      if (compiler->vars[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 (file)
index 0000000..f300d9c
--- /dev/null
@@ -0,0 +1,491 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcarm.h>
+#include <orc/orcutils.h>
+#include <orc/orcdebug.h>
+
+#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<<i);
+    }
+  }
+  if (regs) orc_arm_emit_push (compiler, regs);
+
+}
+
+void
+orc_arm_dump_insns (OrcCompiler *compiler)
+{
+  orc_arm_emit_label (compiler, 0);
+
+  orc_arm_emit_add_r (compiler, ORC_ARM_COND_AL, 0, ORC_ARM_A2, ORC_ARM_A3, ORC_ARM_A4);
+  orc_arm_emit_sub_r (compiler, ORC_ARM_COND_AL, 0, ORC_ARM_A2, ORC_ARM_A3, ORC_ARM_A4);
+  orc_arm_emit_push (compiler, 0x06);
+  orc_arm_emit_mov_r (compiler, ORC_ARM_COND_AL, 0, ORC_ARM_A2, ORC_ARM_A3);
+
+  orc_arm_emit_branch (compiler, ORC_ARM_COND_LE, 0);
+  orc_arm_emit_branch (compiler, ORC_ARM_COND_AL, 0);
+
+  orc_arm_emit_load_imm (compiler, ORC_ARM_A3, 0xa500);
+  orc_arm_loadw (compiler, ORC_ARM_A3, ORC_ARM_A4, 0xa5);
+  orc_arm_emit_load_reg (compiler, ORC_ARM_A3, ORC_ARM_A4, 0x5a5);
+}
+
+void
+orc_arm_emit_epilogue (OrcCompiler *compiler)
+{
+  int i;
+  unsigned int regs = 0;
+
+  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<<i);
+    }
+  }
+  if (regs) orc_arm_emit_pop (compiler, regs);
+  orc_arm_emit_bx_lr (compiler);
+
+  //orc_arm_dump_insns (compiler);
+}
+
+static OrcTarget orc_arm_target = {
+  "arm",
+#ifdef HAVE_ARM
+  TRUE,
+#else
+  FALSE,
+#endif
+  ORC_GP_REG_BASE,
+  orc_compiler_orc_arm_get_default_flags,
+  orc_compiler_orc_arm_init,
+  orc_compiler_orc_arm_assemble,
+  { { 0 } },
+  0,
+  NULL,
+  NULL,
+  NULL,
+  orc_arm_flush_cache
+};
+
+void
+orc_arm_init (void)
+{
+#if defined(HAVE_ARM)
+  orc_arm_get_cpu_flags ();
+#endif
+
+  orc_target_register (&orc_arm_target);
+
+  orc_compiler_orc_arm_register_rules (&orc_arm_target);
+}
+
+unsigned int
+orc_compiler_orc_arm_get_default_flags (void)
+{
+#if defined(HAVE_ARM)
+  return orc_arm_get_cpu_flags ();
+#else
+  return ORC_TARGET_ARM_EDSP;
+#endif
+}
+
+void
+orc_compiler_orc_arm_init (OrcCompiler *compiler)
+{
+  int i;
+
+  for(i=ORC_GP_REG_BASE;i<ORC_GP_REG_BASE+9;i++){
+    compiler->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;i<ORC_N_REGS;i++){
+    compiler->alloc_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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;i<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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;j<compiler->n_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;k<opcode->n_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;k<ORC_STATIC_OPCODE_N_SRC;k++){
+      if (opcode->src_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;k<ORC_STATIC_OPCODE_N_DEST;k++){
+      if (opcode->dest_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;k<ORC_N_COMPILER_VARIABLES;k++){
+    if (compiler->vars[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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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 (file)
index 0000000..c5a3baa
--- /dev/null
@@ -0,0 +1,1403 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <orc/orc.h>
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+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;i<ORC_GP_REG_BASE+32;i++){
+    compiler->valid_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 <stdint.h>\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 <limits.h>\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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcVariable *var = compiler->vars + 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;i<ORC_N_COMPILER_VARIABLES;i++){
+      OrcVariable *var = compiler->vars + 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;i<ORC_N_COMPILER_VARIABLES;i++){
+      OrcVariable *var = compiler->vars + 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;j<compiler->n_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;i<n;i++){
+        compiler->unroll_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;j<compiler->n_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;i<n;i++){
+        compiler->unroll_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    char varname[40];
+    OrcVariable *var = compiler->vars + 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 (file)
index 0000000..de66a18
--- /dev/null
@@ -0,0 +1,1086 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <orc/orc.h>
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+//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;i<ORC_GP_REG_BASE+16;i++){
+    compiler->valid_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcVariable *var = compiler->vars + 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;i<ORC_N_COMPILER_VARIABLES;i++){
+      OrcVariable *var = compiler->vars + 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;i<ORC_N_COMPILER_VARIABLES;i++){
+      OrcVariable *var = compiler->vars + 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)-1);
+    ORC_ASM_CODE(compiler,"%*s  for (i = 0; i < n1; i++) {\n", prefix, "");
+    compiler->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)-1);
+    ORC_ASM_CODE(compiler,"%*s  for (i = 0; i < n3; i++) {\n", prefix, "");
+    compiler->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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcVariable *var = compiler->vars + 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;j<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcVariable *var = compiler->vars + 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 (file)
index 0000000..f67926f
--- /dev/null
@@ -0,0 +1,1097 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcx86.h>
+#include <orc/orcmmx.h>
+#include <orc/orcutils.h>
+#include <orc/orcdebug.h>
+
+#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;i<ORC_GP_REG_BASE+16;i++){
+      compiler->valid_regs[i] = 1;
+    }
+    compiler->valid_regs[X86_ESP] = 0;
+#ifndef MMX
+    for(i=X86_MM0;i<X86_MM0+16;i++){
+      compiler->valid_regs[i] = 1;
+    }
+#else
+    for(i=X86_MM0;i<X86_MM0+8;i++){
+      compiler->valid_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;i<X86_MM0+16;i++){
+      compiler->save_regs[i] = 1;
+    }
+#endif
+  } else {
+    for(i=ORC_GP_REG_BASE;i<ORC_GP_REG_BASE+8;i++){
+      compiler->valid_regs[i] = 1;
+    }
+    compiler->valid_regs[X86_ESP] = 0;
+    if (compiler->use_frame_pointer) {
+      compiler->valid_regs[X86_EBP] = 0;
+    }
+    for(i=X86_MM0;i<X86_MM0+8;i++){
+      compiler->valid_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;i<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcVariable *var = compiler->vars + 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_pslld (compiler, i, reg);
+      return;
+    }
+    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_psllw (compiler, i, reg);
+      return;
+    }
+    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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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;i<compiler->n_constants;i++){
+    compiler->constants[i].alloc_reg =
+      orc_compiler_get_constant_reg (compiler);
+  }
+
+  for(i=0;i<compiler->n_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;i<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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<<align_shift) - 1, X86_EAX);
+  orc_x86_emit_sar_imm_reg (compiler, 4, var_size_shift, X86_EAX);
+
+  /* check if n1 is greater than n. */
+  orc_x86_emit_cmp_reg_memoffset (compiler, 4, X86_EAX,
+      (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->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;j<compiler->n_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<<compiler->loop_shift)) {
+      ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift);
+      orc_mmx_emit_loop (compiler, compiler->offset, 0);
+
+      n_left -= 1<<compiler->loop_shift;
+      compiler->offset += 1<<compiler->loop_shift;
+    }
+    for(loop_shift = compiler->loop_shift-1; loop_shift>=0; loop_shift--) {
+      if (n_left >= (1<<loop_shift)) {
+        compiler->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<<loop_shift;
+        compiler->offset += 1<<loop_shift;
+      }
+    }
+    compiler->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;l<save_loop_shift;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<<compiler->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<<compiler->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<<compiler->unroll_shift;
+    for(ui=0;ui<ui_max;ui++) {
+      compiler->offset = ui<<compiler->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<<compiler->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<<compiler->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;j<compiler->n_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;k<ORC_N_COMPILER_VARIABLES;k++){
+      OrcVariable *var = compiler->vars + 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;j<compiler->n_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 (file)
index 0000000..6da9083
--- /dev/null
@@ -0,0 +1,939 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcarm.h>
+#include <orc/orcutils.h>
+#include <orc/orcdebug.h>
+
+#include <orc/orcneon.h>
+
+#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<<i);
+    }
+  }
+  if (regs) orc_arm_emit_push (compiler, regs);
+
+}
+
+void
+orc_neon_dump_insns (OrcCompiler *compiler)
+{
+
+  orc_arm_emit_label (compiler, 0);
+
+  orc_arm_emit_add (compiler, ORC_ARM_A2, ORC_ARM_A3, ORC_ARM_A4);
+  orc_arm_emit_sub (compiler, ORC_ARM_A2, ORC_ARM_A3, ORC_ARM_A4);
+  orc_arm_emit_push (compiler, 0x06);
+  orc_arm_emit_mov (compiler, ORC_ARM_A2, ORC_ARM_A3);
+
+  orc_arm_emit_branch (compiler, ORC_ARM_COND_LE, 0);
+  orc_arm_emit_branch (compiler, ORC_ARM_COND_AL, 0);
+
+  orc_arm_emit_load_imm (compiler, ORC_ARM_A3, 0xa500);
+  orc_arm_loadw (compiler, ORC_ARM_A3, ORC_ARM_A4, 0xa5);
+  orc_arm_emit_load_reg (compiler, ORC_ARM_A3, ORC_ARM_A4, 0x5a5);
+}
+
+void
+orc_neon_emit_epilogue (OrcCompiler *compiler)
+{
+  int i;
+  unsigned int regs = 0;
+
+  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<<i);
+    }
+  }
+  if (regs) orc_arm_emit_pop (compiler, regs);
+  orc_arm_emit_bx_lr (compiler);
+
+  //arm_dump_insns (compiler);
+}
+
+static OrcTarget neon_target = {
+  "neon",
+#ifdef HAVE_ARM
+  TRUE,
+#else
+  FALSE,
+#endif
+  ORC_VEC_REG_BASE,
+  orc_compiler_neon_get_default_flags,
+  orc_compiler_neon_init,
+  orc_compiler_neon_assemble,
+  { { 0 } }, 0,
+  NULL,
+  NULL,
+  NULL,
+  orc_arm_flush_cache
+};
+
+void
+orc_neon_init (void)
+{
+#if defined(HAVE_ARM)
+  if (!(orc_arm_get_cpu_flags () & ORC_TARGET_NEON_NEON)) {
+    ORC_INFO("marking neon backend non-executable");
+    neon_target.executable = FALSE;
+  }
+#endif
+
+  orc_target_register (&neon_target);
+
+  orc_compiler_neon_register_rules (&neon_target);
+}
+
+unsigned int
+orc_compiler_neon_get_default_flags (void)
+{
+  return ORC_TARGET_NEON_NEON;
+}
+
+void
+orc_compiler_neon_init (OrcCompiler *compiler)
+{
+  int i;
+  int loop_shift;
+
+  for(i=ORC_GP_REG_BASE;i<ORC_GP_REG_BASE+16;i++){
+    compiler->valid_regs[i] = 1;
+  }
+  for(i=ORC_VEC_REG_BASE+0;i<ORC_VEC_REG_BASE+32;i+=2){
+    compiler->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<12;i++) {
+    compiler->save_regs[ORC_GP_REG_BASE+i] = 1;
+  }
+  
+  for(i=0;i<ORC_N_REGS;i++){
+    compiler->alloc_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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;i<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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<<compiler->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<<align_shift);
+
+    orc_arm_emit_load_reg (compiler, ORC_ARM_A2, compiler->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<<align_shift)-1);
+    if (var_size_shift > 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<<compiler->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<<compiler->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<<compiler->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;j<compiler->n_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;k<opcode->n_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;k<ORC_STATIC_OPCODE_N_SRC;k++){
+      if (opcode->src_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;k<ORC_STATIC_OPCODE_N_DEST;k++){
+      if (opcode->dest_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;k<ORC_N_COMPILER_VARIABLES;k++){
+    if (compiler->vars[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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcVariable *var = compiler->vars + 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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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 (file)
index 0000000..21c980c
--- /dev/null
@@ -0,0 +1,1097 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcx86.h>
+#include <orc/orcsse.h>
+#include <orc/orcutils.h>
+#include <orc/orcdebug.h>
+
+#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;i<ORC_GP_REG_BASE+16;i++){
+      compiler->valid_regs[i] = 1;
+    }
+    compiler->valid_regs[X86_ESP] = 0;
+#ifndef MMX
+    for(i=X86_XMM0;i<X86_XMM0+16;i++){
+      compiler->valid_regs[i] = 1;
+    }
+#else
+    for(i=X86_XMM0;i<X86_XMM0+8;i++){
+      compiler->valid_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;i<X86_XMM0+16;i++){
+      compiler->save_regs[i] = 1;
+    }
+#endif
+  } else {
+    for(i=ORC_GP_REG_BASE;i<ORC_GP_REG_BASE+8;i++){
+      compiler->valid_regs[i] = 1;
+    }
+    compiler->valid_regs[X86_ESP] = 0;
+    if (compiler->use_frame_pointer) {
+      compiler->valid_regs[X86_EBP] = 0;
+    }
+    for(i=X86_XMM0;i<X86_XMM0+8;i++){
+      compiler->valid_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;i<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    OrcVariable *var = compiler->vars + 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_pslld (compiler, i, reg);
+      return;
+    }
+    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_psllw (compiler, i, reg);
+      return;
+    }
+    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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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;i<compiler->n_constants;i++){
+    compiler->constants[i].alloc_reg =
+      orc_compiler_get_constant_reg (compiler);
+  }
+
+  for(i=0;i<compiler->n_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;i<compiler->n_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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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;i<ORC_N_COMPILER_VARIABLES;i++){
+    if (compiler->vars[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<<align_shift) - 1, X86_EAX);
+  orc_x86_emit_sar_imm_reg (compiler, 4, var_size_shift, X86_EAX);
+
+  /* check if n1 is greater than n. */
+  orc_x86_emit_cmp_reg_memoffset (compiler, 4, X86_EAX,
+      (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->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;j<compiler->n_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<<compiler->loop_shift)) {
+      ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift);
+      orc_sse_emit_loop (compiler, compiler->offset, 0);
+
+      n_left -= 1<<compiler->loop_shift;
+      compiler->offset += 1<<compiler->loop_shift;
+    }
+    for(loop_shift = compiler->loop_shift-1; loop_shift>=0; loop_shift--) {
+      if (n_left >= (1<<loop_shift)) {
+        compiler->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<<loop_shift;
+        compiler->offset += 1<<loop_shift;
+      }
+    }
+    compiler->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;l<save_loop_shift;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<<compiler->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<<compiler->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<<compiler->unroll_shift;
+    for(ui=0;ui<ui_max;ui++) {
+      compiler->offset = ui<<compiler->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<<compiler->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<<compiler->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;j<compiler->n_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;k<ORC_N_COMPILER_VARIABLES;k++){
+      OrcVariable *var = compiler->vars + 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;j<compiler->n_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 (file)
index 0000000..fd7d32d
--- /dev/null
@@ -0,0 +1,961 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+/**
+ * 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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;j<program->n_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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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 (file)
index 0000000..844f9ae
--- /dev/null
@@ -0,0 +1,778 @@
+
+#ifndef _ORC_PROGRAM_H_
+#define _ORC_PROGRAM_H_
+
+#include <orc/orcutils.h>
+
+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 (file)
index 0000000..4cd9910
--- /dev/null
@@ -0,0 +1,37 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+/**
+ * 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 (file)
index 0000000..e86802c
--- /dev/null
@@ -0,0 +1,1199 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcpowerpc.h>
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+
+
+
+/* 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 (file)
index 0000000..b5b0e76
--- /dev/null
@@ -0,0 +1,1718 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcdebug.h>
+#include <orc/orcprogram.h>
+#include <orc/orcarm.h>
+
+#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 (file)
index 0000000..bb7b1c1
--- /dev/null
@@ -0,0 +1,2949 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+#include <orc/orcmmx.h>
+
+#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<<compiler->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<<compiler->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<<compiler->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<<p->loop_shift), tmp);
+    orc_mmx_emit_movq (p, src2, tmp2);
+    orc_mmx_emit_pslldq (p, 16 - (1<<p->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<<p->loop_shift)), tmp);
+    orc_mmx_emit_movq (p, src2, tmp2);
+    orc_mmx_emit_psllq (p, 8*(8 - (1<<p->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<<type, 1);
+  if (src == dest) {
+    orc_mmx_emit_660f (p, names[type], codes[type], src, tmpc);
+    orc_mmx_emit_movq (p, tmpc, dest);
+  } else {
+    /* FIXME this would be a good opportunity to not chain src to dest */
+    orc_mmx_emit_movq (p, tmpc, dest);
+    orc_mmx_emit_660f (p, names[type], codes[type], src, dest);
+  }
+}
+
+static void
+mmx_rule_signw_slow (OrcCompiler *p, void *user, OrcInstruction *insn)
+{
+  int dest = p->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<<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_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<<p->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<<p->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 (file)
index 0000000..57e78ea
--- /dev/null
@@ -0,0 +1,2811 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcarm.h>
+#include <orc/orcdebug.h>
+
+#include <orc/orcneon.h>
+
+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<<compiler->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<<compiler->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<<compiler->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<<compiler->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<<compiler->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<<compiler->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<<shift,
+        orc_neon_reg_name (dest->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<<shift,
+        orc_neon_reg_name (src->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)) == value) {
+    value >>= 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)) == value) {
+    value >>= 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)) == value) {
+    value >>= 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<<p->insn_shift));
+    code = NEON_BINARY(0xf2a00590, p->tmpreg, 0, p->tmpreg);
+    code |= (64 - (16<<p->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 (file)
index 0000000..2b35983
--- /dev/null
@@ -0,0 +1,2949 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+#include <orc/orcsse.h>
+
+#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<<compiler->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<<compiler->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<<compiler->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<<p->loop_shift), tmp);
+    orc_sse_emit_movdqa (p, src2, tmp2);
+    orc_sse_emit_pslldq (p, 16 - (1<<p->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<<p->loop_shift)), tmp);
+    orc_sse_emit_movdqa (p, src2, tmp2);
+    orc_sse_emit_psllq (p, 8*(8 - (1<<p->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<<type, 1);
+  if (src == dest) {
+    orc_sse_emit_660f (p, names[type], codes[type], src, tmpc);
+    orc_sse_emit_movdqa (p, tmpc, dest);
+  } else {
+    /* FIXME this would be a good opportunity to not chain src to dest */
+    orc_sse_emit_movdqa (p, tmpc, dest);
+    orc_sse_emit_660f (p, names[type], codes[type], src, dest);
+  }
+}
+
+static void
+sse_rule_signw_slow (OrcCompiler *p, void *user, OrcInstruction *insn)
+{
+  int dest = p->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<<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_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<<p->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<<p->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 (file)
index 0000000..6e932e4
--- /dev/null
@@ -0,0 +1,458 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcdebug.h>
+#include <orc/orcsse.h>
+
+/**
+ * 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 && i<X86_XMM0 + 16) return x86_regs[i - X86_XMM0];
+  switch (i) {
+    case 0:
+      return "UNALLOCATED";
+    case 1:
+      return "direct";
+    default:
+      return "ERROR";
+  }
+}
+
+void
+orc_sse_emit_f20f (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++ = 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<<shift,
+          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,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1),
+          orc_x86_get_regname_ptr(compiler, regindex), 1<<shift,
+          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,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1),
+            orc_x86_get_regname_ptr(compiler, regindex), 1<<shift,
+            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,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1),
+            orc_x86_get_regname_ptr(compiler, regindex), 1<<shift,
+            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_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 (file)
index 0000000..6b58e7f
--- /dev/null
@@ -0,0 +1,221 @@
+
+#ifndef _ORC_SSE_H_
+#define _ORC_SSE_H_
+
+#include <orc/orcx86.h>
+
+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 (file)
index 0000000..a37129d
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * ORC - Library of Optimized Inner Loops
+ * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
+ * 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 <orc/orcdebug.h>
+#include <orc/orcutils.h>
+
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+/**
+ * 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 (file)
index 0000000..750f80a
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * ORC - Library of Optimized Inner Loops
+ * Copyright (c) 2007 David A. Schleef <ds@schleef.org>
+ * 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 <stdint.h>
+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 <limits.h>
+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 (file)
index 0000000..ce6fcf9
--- /dev/null
@@ -0,0 +1,1149 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+#include <orc/orcx86.h>
+#include <orc/orcdebug.h>
+#include <orc/orcutils.h>
+
+
+/**
+ * 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 + 16) return x86_regs[i - ORC_GP_REG_BASE];
+  switch (i) {
+    case 0:
+      return "UNALLOCATED";
+    case 1:
+      return "direct";
+    default:
+      return "ERROR";
+  }
+}
+
+int
+orc_x86_get_regnum(int i)
+{
+  return (i&0xf);
+}
+
+const char *
+orc_x86_get_regname_8(int i)
+{
+  static const char *x86_regs[] = { "al", "cl", "dl", "bl",
+    "ah", "ch", "dh", "bh" };
+
+  if (i>=ORC_GP_REG_BASE && i<ORC_GP_REG_BASE + 8) return x86_regs[i - ORC_GP_REG_BASE];
+  switch (i) {
+    case 0:
+      return "UNALLOCATED";
+    case 1:
+      return "direct";
+    default:
+      return "ERROR";
+  }
+}
+
+const char *
+orc_x86_get_regname_16(int i)
+{
+  static const char *x86_regs[] = { "ax", "cx", "dx", "bx",
+    "sp", "bp", "si", "di" };
+
+  if (i>=ORC_GP_REG_BASE && i<ORC_GP_REG_BASE + 8) return x86_regs[i - ORC_GP_REG_BASE];
+  switch (i) {
+    case 0:
+      return "UNALLOCATED";
+    case 1:
+      return "direct";
+    default:
+      return "ERROR";
+  }
+}
+
+const char *
+orc_x86_get_regname_64(int i)
+{
+  static const char *x86_regs[] = {
+    "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
+    "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" };
+
+  if (i>=ORC_GP_REG_BASE && i<ORC_GP_REG_BASE + 16) return x86_regs[i - ORC_GP_REG_BASE];
+  switch (i) {
+    case 0:
+      return "UNALLOCATED";
+    case 1:
+      return "direct";
+    default:
+      return "ERROR";
+  }
+}
+
+const char *
+orc_x86_get_regname_ptr(OrcCompiler *compiler, int i)
+{
+  if (compiler->is_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<<shift,
+        orc_x86_get_regname(reg2));
+  } else {
+    ORC_ASM_CODE(compiler,"  leaq (%%%s, %%%s, %d), %%%s\n",
+        orc_x86_get_regname_ptr(compiler, reg2),
+        orc_x86_get_regname_ptr(compiler, reg1), 1<<shift,
+        orc_x86_get_regname_ptr(compiler, reg2));
+  }
+
+  orc_x86_emit_rex(compiler, size, reg2, reg1, reg2);
+  *compiler->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;i<compiler->n_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<<align_shift) - 1);
+  while (diff) {
+    ORC_ASM_CODE(compiler,"  nop\n");
+    *compiler->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 (file)
index 0000000..05b4f9f
--- /dev/null
@@ -0,0 +1,107 @@
+
+#ifndef _ORC_X86_H_
+#define _ORC_X86_H_
+
+#include <orc/orcprogram.h>
+
+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 (file)
index 0000000..b98aa6e
--- /dev/null
@@ -0,0 +1,13 @@
+Signed-off-by: Topi Santakivi <topi.santakivi@digia.com>
+---
+--- 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 (file)
index 0000000..5395268
Binary files /dev/null and b/packaging/orc-0.4.11.tar.bz2 differ
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 (file)
index 0000000..27740b1
--- /dev/null
@@ -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 (file)
index 0000000..29df86f
--- /dev/null
@@ -0,0 +1,16 @@
+* Wed May 30 03:17:39 UTC 2012 - Lin Yang <lin.a.yang@intel.con> - 0.4.11
+- Initial commit to Gerrit
+
+* Fri Jan 28 2011 Topi Santakivi <topi.santakivi@digia.com> - 0.4.11
+- add-armv7l-to-as-host-defines.patch (BMC#13056)
+
+* Thu Nov 04 2010 Ling Yue <ling.yue@intel.com> - 0.4.11
+- Upgrade to 0.4.11 (BMC#10209)
+
+* Tue Aug 10 2010 Carsten Munk <carsten@maemo.org> - 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 <ling.yue@intel.com> - 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 (file)
index 0000000..d9a450c
--- /dev/null
@@ -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 (file)
index 0000000..8cec90f
--- /dev/null
@@ -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 (file)
index 0000000..2e0044b
--- /dev/null
@@ -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 (file)
index 0000000..d7a42a3
--- /dev/null
@@ -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 (file)
index 0000000..553c8fa
--- /dev/null
@@ -0,0 +1,33 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <orc/orc.h>
+
+#include <stdio.h>
+
+
+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 (file)
index 0000000..8bc1152
--- /dev/null
@@ -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 (file)
index 0000000..0130347
--- /dev/null
@@ -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 (file)
index 0000000..fc72d91
--- /dev/null
@@ -0,0 +1,693 @@
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+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;i<n;i++){
+    double perf;
+    double weight;
+
+    perf = orc_test_performance_full (programs[i], 0, NULL);
+
+    if (perf == 0) {
+      weight = 0;
+    } else {
+      weight = 1.0/perf/241.0;
+      sum++;
+    }
+    printf(" %g, /* %s */\n", weight, programs[i]->name);
+  }
+  printf("sum = %g\n", sum);
+#else
+  sum = 0;
+  for(i=0;i<n;i++){
+    double perf;
+    double weight;
+
+    perf = orc_test_performance_full (programs[i], 0, NULL);
+    //weight = weights_ginger[i];
+    weight = weights_n900[i];
+
+    sum += weight * perf;
+  }
+  printf("score %g\n", 100.0/sum);
+#endif
+
+  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;
+}
+
+
+
+/* tables */
+
+/* ginger Intel(R) Core(TM)2 CPU         T7600  @ 2.33GHz */
+
+double weights_ginger[] = {
+ 0.00539898, /* orc_scalarmultiply_f32_ns */
+ 0.00173034, /* orc_process_int16 */
+ 0.00229296, /* orc_process_int16_clamp */
+ 0.00238334, /* orc_process_int8 */
+ 0.00286, /* orc_process_int8_clamp */
+ 0.00224671, /* orc_audio_convert_unpack_u8 */
+ 0.00223485, /* orc_audio_convert_unpack_s8 */
+ 0.00261931, /* orc_audio_convert_unpack_u16 */
+ 0.0026756, /* orc_audio_convert_unpack_s16 */
+ 0.00187791, /* orc_audio_convert_unpack_u16_swap */
+ 0.00188964, /* orc_audio_convert_unpack_s16_swap */
+ 0.0018846, /* orc_audio_convert_unpack_u32 */
+ 0.00208672, /* orc_audio_convert_unpack_s32 */
+ 0.00158413, /* orc_audio_convert_unpack_u32_swap */
+ 0.0016592, /* orc_audio_convert_unpack_s32_swap */
+ 0.00113724, /* orc_audio_convert_unpack_float_s32 */
+ 0.000966394, /* orc_audio_convert_unpack_float_s32_swap */
+ 0.00163051, /* orc_audio_convert_unpack_float_double */
+ 0.00129049, /* orc_audio_convert_unpack_float_double_swap */
+ 0.00328124, /* orc_audio_convert_unpack_double_double */
+ 0.0019506, /* orc_audio_convert_unpack_double_double_swap */
+ 0.000854422, /* orc_audio_convert_unpack_u8_double */
+ 0.000841177, /* orc_audio_convert_unpack_s8_double */
+ 0.0013211, /* orc_audio_convert_unpack_u16_double */
+ 0.0012878, /* orc_audio_convert_unpack_s16_double */
+ 0.000888871, /* orc_audio_convert_unpack_u16_double_swap */
+ 0.00113332, /* orc_audio_convert_unpack_s16_double_swap */
+ 0.00125976, /* orc_audio_convert_unpack_u32_double */
+ 0.00204625, /* orc_audio_convert_unpack_s32_double */
+ 0.0010244, /* orc_audio_convert_unpack_u32_double_swap */
+ 0.00148207, /* orc_audio_convert_unpack_s32_double_swap */
+ 0.00135233, /* orc_audio_convert_pack_u8 */
+ 0.0013869, /* orc_audio_convert_pack_s8 */
+ 0.0021164, /* orc_audio_convert_pack_u16 */
+ 0.00211852, /* orc_audio_convert_pack_s16 */
+ 0.00183715, /* orc_audio_convert_pack_u16_swap */
+ 0.00200417, /* orc_audio_convert_pack_s16_swap */
+ 0.00193889, /* orc_audio_convert_pack_u32 */
+ 0.00208307, /* orc_audio_convert_pack_s32 */
+ 0.00159261, /* orc_audio_convert_pack_u32_swap */
+ 0.00167437, /* orc_audio_convert_pack_s32_swap */
+ 0.00143194, /* orc_audio_convert_pack_s32_float */
+ 0.00118178, /* orc_audio_convert_pack_s32_float_swap */
+ 0.00268428, /* orc_audio_convert_pack_double_float */
+ 0.0014616, /* orc_audio_convert_pack_double_float_swap */
+ 0.000483737, /* orc_audio_convert_pack_double_s8 */
+ 0.000686549, /* orc_audio_convert_pack_double_s16 */
+ 0.000577306, /* orc_audio_convert_pack_double_s16_swap */
+ 0.00100781, /* orc_audio_convert_pack_double_s32 */
+ 0.000784434, /* orc_audio_convert_pack_double_s32_swap */
+ 0.0172065, /* gst_orc_splat_u8 */
+ 0.0121632, /* gst_orc_splat_s16 */
+ 0.01221, /* gst_orc_splat_u16 */
+ 0.00740001, /* gst_orc_splat_u32 */
+ 0.00205476, /* orc_merge_linear_u8 */
+ 0.000841177, /* orc_merge_linear_u16 */
+ 0.0120937, /* orc_splat_u16 */
+ 0.00740001, /* orc_splat_u32 */
+ 0.00367431, /* orc_downsample_u8 */
+ 0.00148717, /* orc_downsample_u16 */
+ 0.00182448, /* gst_videoscale_orc_downsample_u32 */
+ 0.000360484, /* gst_videoscale_orc_downsample_yuyv */
+ 0, /* gst_videoscale_orc_resample_nearest_u8 */
+ 0, /* gst_videoscale_orc_resample_bilinear_u8 */
+ 0.0011403, /* gst_videoscale_orc_resample_nearest_u32 */
+ 0.000404898, /* gst_videoscale_orc_resample_bilinear_u32 */
+ 0.00027372, /* gst_videoscale_orc_resample_merge_bilinear_u32 */
+ 0.000888871, /* gst_videoscale_orc_merge_bicubic_u8 */
+ 0.00122619, /* add_int32 */
+ 0.0044839, /* add_int16 */
+ 0.00820311, /* add_int8 */
+ 0.00138106, /* add_uint32 */
+ 0.0044839, /* add_uint16 */
+ 0.00807787, /* add_uint8 */
+ 0.00177998, /* add_float32 */
+ 0.00737422, /* orc_splat_u32 */
+ 0.00221845, /* orc_memcpy_u32 */
+ 0.00294308, /* orc_blend_u8 */
+ 0.000216663, /* orc_blend_argb */
+ 0.000213342, /* orc_blend_bgra */
+ 0.00737422, /* orc_splat_u32 */
+ 0.000987128, /* deinterlace_line_vfir */
+ 0.00386205, /* deinterlace_line_linear */
+ 0.00178901, /* deinterlace_line_linear_blend */
+ 0, /* deinterlace_line_greedy */
+ 0.00824266, /* cogorc_memcpy_2d */
+ 0.00483197, /* cogorc_downsample_horiz_cosite_1tap */
+ 0.00139512, /* cogorc_downsample_horiz_cosite_3tap */
+ 0.00157236, /* cogorc_downsample_420_jpeg */
+ 0.00387619, /* cogorc_downsample_vert_halfsite_2tap */
+ 0.00175199, /* cogorc_downsample_vert_cosite_3tap */
+ 0.00131699, /* cogorc_downsample_vert_halfsite_4tap */
+ 0.00594495, /* cogorc_upsample_horiz_cosite_1tap */
+ 0.003575, /* cogorc_upsample_horiz_cosite */
+ 0.00371299, /* cogorc_upsample_vert_avgub */
+ 0.00495645, /* orc_unpack_yuyv_y */
+ 0.00172345, /* orc_unpack_yuyv_u */
+ 0.0019524, /* orc_unpack_yuyv_v */
+ 0.000834873, /* orc_pack_yuyv */
+ 0.0059283, /* orc_unpack_uyvy_y */
+ 0.0015303, /* orc_unpack_uyvy_u */
+ 0.00172345, /* orc_unpack_uyvy_v */
+ 0.000837184, /* orc_pack_uyvy */
+ 0.00245522, /* orc_matrix2_u8 */
+ 0, /* orc_matrix2_11_u8 */
+ 0, /* orc_matrix2_12_u8 */
+ 0.00145158, /* orc_matrix3_u8 */
+ 0, /* orc_matrix3_100_u8 */
+ 0.00138146, /* orc_matrix3_100_offset_u8 */
+ 0.00134289, /* orc_matrix3_000_u8 */
+ 0.00164957, /* orc_pack_123x */
+ 0.00160943, /* orc_pack_x123 */
+ 0.00254681, /* cogorc_combine2_u8 */
+ 0.000633112, /* cogorc_convert_I420_UYVY */
+ 0.000635284, /* cogorc_convert_I420_YUY2 */
+ 0.000541003, /* cogorc_convert_I420_AYUV */
+ 0.00055886, /* cogorc_convert_YUY2_I420 */
+ 0.00187425, /* cogorc_convert_UYVY_YUY2 */
+ 0.00277488, /* cogorc_planar_chroma_420_422 */
+ 0.00147587, /* cogorc_planar_chroma_420_444 */
+ 0.00624044, /* cogorc_planar_chroma_422_444 */
+ 0.0038428, /* cogorc_planar_chroma_444_422 */
+ 0.00203705, /* cogorc_planar_chroma_444_420 */
+ 0.00434352, /* cogorc_planar_chroma_422_420 */
+ 0.0005254, /* cogorc_convert_YUY2_AYUV */
+ 0.000538103, /* cogorc_convert_UYVY_AYUV */
+ 0.00100143, /* cogorc_convert_YUY2_Y42B */
+ 0.00103223, /* cogorc_convert_UYVY_Y42B */
+ 0.000770722, /* cogorc_convert_YUY2_Y444 */
+ 0.000778117, /* cogorc_convert_UYVY_Y444 */
+ 0.00055886, /* cogorc_convert_UYVY_I420 */
+ 0, /* cogorc_convert_AYUV_I420 */
+ 0.000341915, /* cogorc_convert_AYUV_YUY2 */
+ 0.000348717, /* cogorc_convert_AYUV_UYVY */
+ 0.000312522, /* cogorc_convert_AYUV_Y42B */
+ 0.000873979, /* cogorc_convert_AYUV_Y444 */
+ 0.00161992, /* cogorc_convert_Y42B_YUY2 */
+ 0.00165063, /* cogorc_convert_Y42B_UYVY */
+ 0.000588503, /* cogorc_convert_Y42B_AYUV */
+ 0.000805998, /* cogorc_convert_Y444_YUY2 */
+ 0.000815565, /* cogorc_convert_Y444_UYVY */
+ 0.0014937, /* cogorc_convert_Y444_AYUV */
+ 0, /* cogorc_convert_AYUV_ARGB */
+ 0, /* cogorc_convert_AYUV_BGRA */
+ 0, /* cogorc_convert_AYUV_ABGR */
+ 0, /* cogorc_convert_AYUV_RGBA */
+ 0, /* cogorc_convert_I420_BGRA */
+ 0, /* cogorc_convert_I420_BGRA_avg */
+ 0.000819403, /* cogorc_getline_I420 */
+ 0.00057497, /* cogorc_getline_YUY2 */
+ 0.000551146, /* cogorc_getline_UYVY */
+ 0.000562873, /* cogorc_getline_YVYU */
+ 0.000552297, /* cogorc_getline_Y42B */
+ 0.00156539, /* cogorc_getline_Y444 */
+ 0.00260962, /* cogorc_getline_Y800 */
+ 0.00185722, /* cogorc_getline_BGRA */
+ 0.000454554, /* cogorc_getline_ABGR */
+ 0.000452223, /* cogorc_getline_RGBA */
+ 0.000903587, /* cogorc_getline_NV12 */
+ 0.000800455, /* cogorc_getline_NV21 */
+ 0.000286517, /* cogorc_putline_I420 */
+ 0.000349472, /* cogorc_putline_YUY2 */
+ 0.000391564, /* cogorc_putline_YVYU */
+ 0.00035675, /* cogorc_putline_UYVY */
+ 0.000320473, /* cogorc_putline_Y42B */
+ 0.000845209, /* cogorc_putline_Y444 */
+ 0.00172426, /* cogorc_putline_Y800 */
+ 0.00185867, /* cogorc_putline_BGRA */
+ 0.000454814, /* cogorc_putline_ABGR */
+ 0.000451794, /* cogorc_putline_RGBA */
+ 0.000369853, /* cogorc_putline_NV12 */
+ 0.000414899, /* cogorc_putline_NV21 */
+ 0.00161681, /* orc_add2_rshift_add_s16_22_op */
+ 0.00209961, /* orc_add2_rshift_add_s16_22 */
+ 0.00161557, /* orc_add2_rshift_sub_s16_22_op */
+ 0.00209961, /* orc_add2_rshift_sub_s16_22 */
+ 0.00156654, /* orc_add2_rshift_add_s16_11_op */
+ 0.00201776, /* orc_add2_rshift_add_s16_11 */
+ 0.00156654, /* orc_add2_rshift_sub_s16_11_op */
+ 0.00205078, /* orc_add2_rshift_sub_s16_11 */
+ 0.00428421, /* orc_add_const_rshift_s16_11 */
+ 0.00863838, /* orc_add_const_rshift_s16 */
+ 0.00281436, /* orc_add_s16 */
+ 0.00372344, /* orc_add_s16_2d */
+ 0.0022491, /* orc_addc_rshift_s16 */
+ 0.00466168, /* orc_lshift1_s16 */
+ 0.00469616, /* orc_lshift2_s16 */
+ 0.010175, /* orc_lshift_s16_ip */
+ 0.000855112, /* orc_mas2_add_s16_op */
+ 0.000850644, /* orc_mas2_add_s16_ip */
+ 0.000853044, /* orc_mas2_sub_s16_op */
+ 0.000851328, /* orc_mas2_sub_s16_ip */
+ 0.000639672, /* orc_mas4_across_add_s16_1991_op */
+ 0.000673799, /* orc_mas4_across_add_s16_1991_ip */
+ 0.000640558, /* orc_mas4_across_sub_s16_1991_op */
+ 0.000673584, /* orc_mas4_across_sub_s16_1991_ip */
+ 0.00275573, /* orc_subtract_s16 */
+ 0.00267222, /* orc_add_s16_u8 */
+ 0.00544385, /* orc_add_s16_u8_2d */
+ 0.00653211, /* orc_convert_s16_u8 */
+ 0.00678334, /* orc_convert_u8_s16 */
+ 0.00689382, /* orc_offsetconvert_u8_s16 */
+ 0.00584641, /* orc_offsetconvert_s16_u8 */
+ 0.00273437, /* orc_subtract_s16_u8 */
+ 0.00238334, /* orc_multiply_and_add_s16_u8 */
+ 0.012025, /* orc_splat_s16_ns */
+ 0.000952381, /* orc_splat_s16_2d_4xn */
+ 0.00172953, /* orc_splat_s16_2d_8xn */
+ 0.0121284, /* orc_splat_s16_2d */
+ 0.0176367, /* orc_splat_u8_ns */
+ 0.0286862, /* orc_splat_u8_2d */
+ 0.00372606, /* orc_average_u8 */
+ 0.00242965, /* orc_rrshift6_add_s16_2d */
+ 0.00107453, /* orc_rrshift6_sub_s16_2d */
+ 0.0139063, /* orc_rrshift6_s16_ip_2d */
+ 0.011565, /* orc_rrshift6_s16_ip */
+ 0.00493334, /* orc_unpack_yuyv_y */
+ 0.00171647, /* orc_unpack_yuyv_u */
+ 0.00194363, /* orc_unpack_yuyv_v */
+ 0.000834543, /* orc_packyuyv */
+ 0.00591174, /* orc_unpack_uyvy_y */
+ 0.00153214, /* orc_unpack_uyvy_u */
+ 0.00172627, /* orc_unpack_uyvy_v */
+ 0.0029935, /* orc_interleave2_s16 */
+ 0.00201094, /* orc_interleave2_rrshift1_s16 */
+ 0.00140531, /* orc_deinterleave2_s16 */
+ 0.0011584, /* orc_deinterleave2_lshift1_s16 */
+ 0.00131151, /* orc_haar_deint_lshift1_split_s16 */
+ 0.00136132, /* orc_haar_deint_split_s16 */
+ 0.00202333, /* orc_haar_split_s16_lo */
+ 0.00278474, /* orc_haar_split_s16_hi */
+ 0.00127417, /* orc_haar_split_s16_op */
+ 0.00123128, /* orc_haar_split_s16 */
+ 0.0020668, /* orc_haar_synth_s16_lo */
+ 0.00175199, /* orc_haar_synth_s16_hi */
+ 0.00124788, /* orc_haar_synth_s16_op */
+ 0.0010582, /* orc_haar_synth_s16 */
+ 0.00130965, /* orc_haar_synth_rrshift1_int_s16 */
+ 0.00173192, /* orc_haar_synth_int_s16 */
+ 0.00444622, /* orc_haar_sub_s16 */
+ 0.00300625, /* orc_haar_add_half_s16 */
+ 0.00446498, /* orc_haar_add_s16 */
+ 0.00297619, /* orc_haar_sub_half_s16 */
+ 0.00296415, /* orc_sum_u8 */
+ 0.00353913, /* orc_sum_s16 */
+ 0.00195601, /* orc_sum_square_diff_u8 */
+ 0.000907029, /* orc_dequantise_s16_2d_4xn */
+ 0.0010582, /* orc_dequantise_s16_2d_8xn */
+ 0.0010582, /* orc_dequantise_s16_ip_2d_8xn */
+ 0.00607507, /* orc_dequantise_s16_ip_2d */
+ 0.00544062, /* orc_dequantise_s16_ip */
+ 0.002788, /* orc_dequantise_s16 */
+ 0.00177551, /* orc_dequantise_var_s16_ip */
+ 0.00250462, /* orc_quantise1_s16 */
+ 0.00286, /* orc_quantise2_s16 */
+ 0.000653211, /* orc_quantdequant1_s16 */
+ 0.00033615, /* orc_quantdequant3_s16 */
+ 0.000700332, /* orc_quantdequant2_s16 */
+ 0.00117709, /* orc_downsample_vert_u8 */
+ 0.000427844, /* orc_downsample_horiz_u8 */
+ 0.00341907, /* orc_stats_moment_s16 */
+ 0.00300625, /* orc_stats_above_s16 */
+ 0.012025, /* orc_accw */
+ 0.000979968, /* orc_avg2_8xn_u8 */
+ 0.000970018, /* orc_avg2_12xn_u8 */
+ 0.0012075, /* orc_avg2_16xn_u8 */
+ 0.00257509, /* orc_avg2_32xn_u8 */
+ 0.0042909, /* orc_avg2_nxm_u8 */
+ 0.00106312, /* orc_combine4_8xn_u8 */
+ 0.00116315, /* orc_combine4_12xn_u8 */
+ 0.00147629, /* orc_combine4_16xn_u8 */
+ 0.0013289, /* orc_combine4_24xn_u8 */
+ 0.00158025, /* orc_combine4_32xn_u8 */
+ 0.00119665, /* orc_combine4_nxm_u8 */
+ 0.00118816, /* orc_combine2_8xn_u8 */
+ 0.00167189, /* orc_combine2_12xn_u8 */
+ 0.00178851, /* orc_combine2_16xn_u8 */
+ 0.00229296, /* orc_combine2_nxm_u8 */
+ 0.00304518, /* orc_sad_nxm_u8 */
+ 0.0010836, /* orc_sad_8x8_u8 */
+ 0.00171215, /* orc_sad_12x12_u8 */
+ 0.00228437, /* orc_sad_16xn_u8 */
+ 0.00310406, /* orc_sad_32xn_u8 */
+};
+
+double weights_n900[] = {
+ 0.00189692, /* orc_scalarmultiply_f32_ns */
+ 0.000655569, /* orc_process_int16 */
+ 0.000607111, /* orc_process_int16_clamp */
+ 0.00130039, /* orc_process_int8 */
+ 0.00121357, /* orc_process_int8_clamp */
+ 0, /* orc_audio_convert_unpack_u8 */
+ 0.000886761, /* orc_audio_convert_unpack_s8 */
+ 0, /* orc_audio_convert_unpack_u16 */
+ 0.000885403, /* orc_audio_convert_unpack_s16 */
+ 0, /* orc_audio_convert_unpack_u16_swap */
+ 0.000884163, /* orc_audio_convert_unpack_s16_swap */
+ 0, /* orc_audio_convert_unpack_u32 */
+ 0.000886388, /* orc_audio_convert_unpack_s32 */
+ 0, /* orc_audio_convert_unpack_u32_swap */
+ 0.000885463, /* orc_audio_convert_unpack_s32_swap */
+ 0.000887546, /* orc_audio_convert_unpack_float_s32 */
+ 0.00088498, /* orc_audio_convert_unpack_float_s32_swap */
+ 0, /* orc_audio_convert_unpack_float_double */
+ 0, /* orc_audio_convert_unpack_float_double_swap */
+ 0.000453781, /* orc_audio_convert_unpack_double_double */
+ 0.000455403, /* orc_audio_convert_unpack_double_double_swap */
+ 0, /* orc_audio_convert_unpack_u8_double */
+ 0, /* orc_audio_convert_unpack_s8_double */
+ 0, /* orc_audio_convert_unpack_u16_double */
+ 0, /* orc_audio_convert_unpack_s16_double */
+ 0, /* orc_audio_convert_unpack_u16_double_swap */
+ 0, /* orc_audio_convert_unpack_s16_double_swap */
+ 0, /* orc_audio_convert_unpack_u32_double */
+ 0, /* orc_audio_convert_unpack_s32_double */
+ 0, /* orc_audio_convert_unpack_u32_double_swap */
+ 0, /* orc_audio_convert_unpack_s32_double_swap */
+ 0, /* orc_audio_convert_pack_u8 */
+ 0.000923392, /* orc_audio_convert_pack_s8 */
+ 0, /* orc_audio_convert_pack_u16 */
+ 0.0010451, /* orc_audio_convert_pack_s16 */
+ 0, /* orc_audio_convert_pack_u16_swap */
+ 0.000928539, /* orc_audio_convert_pack_s16_swap */
+ 0, /* orc_audio_convert_pack_u32 */
+ 0.000889152, /* orc_audio_convert_pack_s32 */
+ 0, /* orc_audio_convert_pack_u32_swap */
+ 0.000878315, /* orc_audio_convert_pack_s32_swap */
+ 0, /* orc_audio_convert_pack_s32_float */
+ 0, /* orc_audio_convert_pack_s32_float_swap */
+ 0, /* orc_audio_convert_pack_double_float */
+ 0, /* orc_audio_convert_pack_double_float_swap */
+ 0, /* orc_audio_convert_pack_double_s8 */
+ 0, /* orc_audio_convert_pack_double_s16 */
+ 0, /* orc_audio_convert_pack_double_s16_swap */
+ 0, /* orc_audio_convert_pack_double_s32 */
+ 0, /* orc_audio_convert_pack_double_s32_swap */
+ 0.00364483, /* gst_orc_splat_u8 */
+ 0.00176666, /* gst_orc_splat_s16 */
+ 0.00176698, /* gst_orc_splat_u16 */
+ 0.000887025, /* gst_orc_splat_u32 */
+ 0.00120903, /* orc_merge_linear_u8 */
+ 0.000840928, /* orc_merge_linear_u16 */
+ 0.00176687, /* orc_splat_u16 */
+ 0.000886406, /* orc_splat_u32 */
+ 0.00206071, /* orc_downsample_u8 */
+ 0.00111783, /* orc_downsample_u16 */
+ 0.00057776, /* gst_videoscale_orc_downsample_u32 */
+ 0.000282225, /* gst_videoscale_orc_downsample_yuyv */
+ 0, /* gst_videoscale_orc_resample_nearest_u8 */
+ 0, /* gst_videoscale_orc_resample_bilinear_u8 */
+ 0, /* gst_videoscale_orc_resample_nearest_u32 */
+ 0, /* gst_videoscale_orc_resample_bilinear_u32 */
+ 0, /* gst_videoscale_orc_resample_merge_bilinear_u32 */
+ 0.000810787, /* gst_videoscale_orc_merge_bicubic_u8 */
+ 0.00190264, /* add_int32 */
+ 0.00361624, /* add_int16 */
+ 0.00507259, /* add_int8 */
+ 0.00191598, /* add_uint32 */
+ 0.00361182, /* add_uint16 */
+ 0.00507259, /* add_uint8 */
+ 0.00153987, /* add_float32 */
+ 0.00124016, /* orc_splat_u32 */
+ 0.00113814, /* orc_memcpy_u32 */
+ 0.000908623, /* orc_blend_u8 */
+ 0.000133396, /* orc_blend_argb */
+ 0, /* orc_blend_bgra */
+ 0.000901581, /* orc_splat_u32 */
+ 0.000844679, /* deinterlace_line_vfir */
+ 0.00413285, /* deinterlace_line_linear */
+ 0.00123704, /* deinterlace_line_linear_blend */
+ 0.00109371, /* deinterlace_line_greedy */
+ 0.00381793, /* cogorc_memcpy_2d */
+ 0.00377314, /* cogorc_downsample_horiz_cosite_1tap */
+ 0.0010716, /* cogorc_downsample_horiz_cosite_3tap */
+ 0.00183775, /* cogorc_downsample_420_jpeg */
+ 0.00354723, /* cogorc_downsample_vert_halfsite_2tap */
+ 0.00110979, /* cogorc_downsample_vert_cosite_3tap */
+ 0.000901003, /* cogorc_downsample_vert_halfsite_4tap */
+ 0.00170136, /* cogorc_upsample_horiz_cosite_1tap */
+ 0.00165625, /* cogorc_upsample_horiz_cosite */
+ 0.00447476, /* cogorc_upsample_vert_avgub */
+ 0.00463618, /* orc_unpack_yuyv_y */
+ 0.00171047, /* orc_unpack_yuyv_u */
+ 0.00154902, /* orc_unpack_yuyv_v */
+ 0.000832261, /* orc_pack_yuyv */
+ 0.00380119, /* orc_unpack_uyvy_y */
+ 0.00190989, /* orc_unpack_uyvy_u */
+ 0.00170967, /* orc_unpack_uyvy_v */
+ 0.000832185, /* orc_pack_uyvy */
+ 0.00104047, /* orc_matrix2_u8 */
+ 0.000862238, /* orc_matrix2_11_u8 */
+ 0.00082022, /* orc_matrix2_12_u8 */
+ 0.00078049, /* orc_matrix3_u8 */
+ 0.000649602, /* orc_matrix3_100_u8 */
+ 0.000727013, /* orc_matrix3_100_offset_u8 */
+ 0.000760795, /* orc_matrix3_000_u8 */
+ 0.000790078, /* orc_pack_123x */
+ 0.000792433, /* orc_pack_x123 */
+ 0.00117391, /* cogorc_combine2_u8 */
+ 0.000196525, /* cogorc_convert_I420_UYVY */
+ 0.00019252, /* cogorc_convert_I420_YUY2 */
+ 0, /* cogorc_convert_I420_AYUV */
+ 0.000114783, /* cogorc_convert_YUY2_I420 */
+ 0.000977855, /* cogorc_convert_UYVY_YUY2 */
+ 0.000740782, /* cogorc_planar_chroma_420_422 */
+ 0.000600582, /* cogorc_planar_chroma_420_444 */
+ 0.0018566, /* cogorc_planar_chroma_422_444 */
+ 0.00219326, /* cogorc_planar_chroma_444_422 */
+ 0.00130591, /* cogorc_planar_chroma_444_420 */
+ 0.00211275, /* cogorc_planar_chroma_422_420 */
+ 0.000442738, /* cogorc_convert_YUY2_AYUV */
+ 0.000448218, /* cogorc_convert_UYVY_AYUV */
+ 0.000126284, /* cogorc_convert_YUY2_Y42B */
+ 0.00013561, /* cogorc_convert_UYVY_Y42B */
+ 0.000141577, /* cogorc_convert_YUY2_Y444 */
+ 0.000186874, /* cogorc_convert_UYVY_Y444 */
+ 9.1806e-05, /* cogorc_convert_UYVY_I420 */
+ 4.92179e-05, /* cogorc_convert_AYUV_I420 */
+ 0.000387252, /* cogorc_convert_AYUV_YUY2 */
+ 0.000386643, /* cogorc_convert_AYUV_UYVY */
+ 7.10203e-05, /* cogorc_convert_AYUV_Y42B */
+ 0.000121778, /* cogorc_convert_AYUV_Y444 */
+ 0.000693003, /* cogorc_convert_Y42B_YUY2 */
+ 0.00068451, /* cogorc_convert_Y42B_UYVY */
+ 0.000366249, /* cogorc_convert_Y42B_AYUV */
+ 0.000602631, /* cogorc_convert_Y444_YUY2 */
+ 0.00059332, /* cogorc_convert_Y444_UYVY */
+ 0.000742439, /* cogorc_convert_Y444_AYUV */
+ 0.00016071, /* cogorc_convert_AYUV_ARGB */
+ 0.00015913, /* cogorc_convert_AYUV_BGRA */
+ 0.000159045, /* cogorc_convert_AYUV_ABGR */
+ 0.000159024, /* cogorc_convert_AYUV_RGBA */
+ 0, /* cogorc_convert_I420_BGRA */
+ 0, /* cogorc_convert_I420_BGRA_avg */
+ 0, /* cogorc_getline_I420 */
+ 0.000447772, /* cogorc_getline_YUY2 */
+ 0.000449395, /* cogorc_getline_UYVY */
+ 0.000448533, /* cogorc_getline_YVYU */
+ 0.000385634, /* cogorc_getline_Y42B */
+ 0.000794574, /* cogorc_getline_Y444 */
+ 0, /* cogorc_getline_Y800 */
+ 0.000886484, /* cogorc_getline_BGRA */
+ 0.000554285, /* cogorc_getline_ABGR */
+ 0.000558078, /* cogorc_getline_RGBA */
+ 0.000405223, /* cogorc_getline_NV12 */
+ 0.000448563, /* cogorc_getline_NV21 */
+ 8.13877e-05, /* cogorc_putline_I420 */
+ 0.000387218, /* cogorc_putline_YUY2 */
+ 0.00035472, /* cogorc_putline_YVYU */
+ 0.000388082, /* cogorc_putline_UYVY */
+ 7.53593e-05, /* cogorc_putline_Y42B */
+ 0.000140356, /* cogorc_putline_Y444 */
+ 0.0017132, /* cogorc_putline_Y800 */
+ 0.000887432, /* cogorc_putline_BGRA */
+ 0.000554304, /* cogorc_putline_ABGR */
+ 0.000558475, /* cogorc_putline_RGBA */
+ 0.000325961, /* cogorc_putline_NV12 */
+ 0.000302852, /* cogorc_putline_NV21 */
+ 0.00165479, /* orc_add2_rshift_add_s16_22_op */
+ 0.00203387, /* orc_add2_rshift_add_s16_22 */
+ 0.00178764, /* orc_add2_rshift_sub_s16_22_op */
+ 0.00191923, /* orc_add2_rshift_sub_s16_22 */
+ 0.00240863, /* orc_add2_rshift_add_s16_11_op */
+ 0.00236533, /* orc_add2_rshift_add_s16_11 */
+ 0.00238607, /* orc_add2_rshift_sub_s16_11_op */
+ 0.00215832, /* orc_add2_rshift_sub_s16_11 */
+ 0.00181178, /* orc_add_const_rshift_s16_11 */
+ 0.00276915, /* orc_add_const_rshift_s16 */
+ 0.00281042, /* orc_add_s16 */
+ 0.00166994, /* orc_add_s16_2d */
+ 0.00213569, /* orc_addc_rshift_s16 */
+ 0.00285013, /* orc_lshift1_s16 */
+ 0.00245598, /* orc_lshift2_s16 */
+ 0.00370756, /* orc_lshift_s16_ip */
+ 0.000576921, /* orc_mas2_add_s16_op */
+ 0.000574115, /* orc_mas2_add_s16_ip */
+ 0.000577379, /* orc_mas2_sub_s16_op */
+ 0.000572396, /* orc_mas2_sub_s16_ip */
+ 0.000463221, /* orc_mas4_across_add_s16_1991_op */
+ 0.000454726, /* orc_mas4_across_add_s16_1991_ip */
+ 0.000459198, /* orc_mas4_across_sub_s16_1991_op */
+ 0.000454726, /* orc_mas4_across_sub_s16_1991_ip */
+ 0.00228059, /* orc_subtract_s16 */
+ 0.00221536, /* orc_add_s16_u8 */
+ 0.00207322, /* orc_add_s16_u8_2d */
+ 0.00292092, /* orc_convert_s16_u8 */
+ 0.0036697, /* orc_convert_u8_s16 */
+ 0.00262931, /* orc_offsetconvert_u8_s16 */
+ 0.00169662, /* orc_offsetconvert_s16_u8 */
+ 0.00238882, /* orc_subtract_s16_u8 */
+ 0.00214581, /* orc_multiply_and_add_s16_u8 */
+ 0.00171415, /* orc_splat_s16_ns */
+ 0.000393839, /* orc_splat_s16_2d_4xn */
+ 0.00108717, /* orc_splat_s16_2d_8xn */
+ 0.00238507, /* orc_splat_s16_2d */
+ 0.00710336, /* orc_splat_u8_ns */
+ 0.00403526, /* orc_splat_u8_2d */
+ 0.0050664, /* orc_average_u8 */
+ 0.00134097, /* orc_rrshift6_add_s16_2d */
+ 0.000807761, /* orc_rrshift6_sub_s16_2d */
+ 0.00307394, /* orc_rrshift6_s16_ip_2d */
+ 0.00316505, /* orc_rrshift6_s16_ip */
+ 0.00414213, /* orc_unpack_yuyv_y */
+ 0.00171048, /* orc_unpack_yuyv_u */
+ 0.00152237, /* orc_unpack_yuyv_v */
+ 0.000832094, /* orc_packyuyv */
+ 0.00399968, /* orc_unpack_uyvy_y */
+ 0.00191216, /* orc_unpack_uyvy_u */
+ 0.00171008, /* orc_unpack_uyvy_v */
+ 0.000897314, /* orc_interleave2_s16 */
+ 0.000901892, /* orc_interleave2_rrshift1_s16 */
+ 0.00076676, /* orc_deinterleave2_s16 */
+ 0.000698548, /* orc_deinterleave2_lshift1_s16 */
+ 0.00052955, /* orc_haar_deint_lshift1_split_s16 */
+ 0.000541159, /* orc_haar_deint_split_s16 */
+ 0.00193144, /* orc_haar_split_s16_lo */
+ 0.00199633, /* orc_haar_split_s16_hi */
+ 0.00100157, /* orc_haar_split_s16_op */
+ 0.00110899, /* orc_haar_split_s16 */
+ 0.00250888, /* orc_haar_synth_s16_lo */
+ 0.00237495, /* orc_haar_synth_s16_hi */
+ 0.00102733, /* orc_haar_synth_s16_op */
+ 0.000903217, /* orc_haar_synth_s16 */
+ 0.000876559, /* orc_haar_synth_rrshift1_int_s16 */
+ 0.000887662, /* orc_haar_synth_int_s16 */
+ 0.00410694, /* orc_haar_sub_s16 */
+ 0.0032058, /* orc_haar_add_half_s16 */
+ 0.00388831, /* orc_haar_add_s16 */
+ 0.00291108, /* orc_haar_sub_half_s16 */
+ 0.000801367, /* orc_sum_u8 */
+ 0.00114909, /* orc_sum_s16 */
+ 0.000370646, /* orc_sum_square_diff_u8 */
+ 0.00013075, /* orc_dequantise_s16_2d_4xn */
+ 0.000133912, /* orc_dequantise_s16_2d_8xn */
+ 9.03212e-05, /* orc_dequantise_s16_ip_2d_8xn */
+ 0.00113719, /* orc_dequantise_s16_ip_2d */
+ 0.00110444, /* orc_dequantise_s16_ip */
+ 0.0010195, /* orc_dequantise_s16 */
+ 0.00102223, /* orc_dequantise_var_s16_ip */
+ 0.000730524, /* orc_quantise1_s16 */
+ 0.00110444, /* orc_quantise2_s16 */
+ 0.000335265, /* orc_quantdequant1_s16 */
+ 0.000192182, /* orc_quantdequant3_s16 */
+ 0.000417592, /* orc_quantdequant2_s16 */
+ 0.000898304, /* orc_downsample_vert_u8 */
+ 0.000362124, /* orc_downsample_horiz_u8 */
+ 0.000544868, /* orc_stats_moment_s16 */
+ 0.000453732, /* orc_stats_above_s16 */
+ 0.00292441, /* orc_accw */
+ 0.000359527, /* orc_avg2_8xn_u8 */
+ 0.000354736, /* orc_avg2_12xn_u8 */
+ 0.00149989, /* orc_avg2_16xn_u8 */
+ 0.00233937, /* orc_avg2_32xn_u8 */
+ 0.00314972, /* orc_avg2_nxm_u8 */
+ 0.00035942, /* orc_combine4_8xn_u8 */
+ 0.000194902, /* orc_combine4_12xn_u8 */
+ 0.000479254, /* orc_combine4_16xn_u8 */
+ 0.000570636, /* orc_combine4_24xn_u8 */
+ 0.00024299, /* orc_combine4_32xn_u8 */
+ 0.00065699, /* orc_combine4_nxm_u8 */
+ 0.000471688, /* orc_combine2_8xn_u8 */
+ 0.000324071, /* orc_combine2_12xn_u8 */
+ 0.000253177, /* orc_combine2_16xn_u8 */
+ 0.000954874, /* orc_combine2_nxm_u8 */
+ 0.000585976, /* orc_sad_nxm_u8 */
+ 0.000462648, /* orc_sad_8x8_u8 */
+ 0.000516877, /* orc_sad_12x12_u8 */
+ 0.000539588, /* orc_sad_16xn_u8 */
+ 0.000534326, /* orc_sad_32xn_u8 */
+};
+
diff --git a/testsuite/compile_opcodes_sys.c b/testsuite/compile_opcodes_sys.c
new file mode 100644 (file)
index 0000000..ac157e6
--- /dev/null
@@ -0,0 +1,113 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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;i<opcode_set->n_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;i<opcode_set->n_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;i<opcode_set->n_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 (file)
index 0000000..8f88235
--- /dev/null
@@ -0,0 +1,124 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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;i<opcode_set->n_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 (file)
index 0000000..16e92a7
--- /dev/null
@@ -0,0 +1,113 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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;i<opcode_set->n_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;i<opcode_set->n_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;i<opcode_set->n_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 (file)
index 0000000..59b144f
--- /dev/null
@@ -0,0 +1,96 @@
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+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 <file.orc>\n");
+    exit(1);
+  }
+
+  n = orc_parse (code, &programs);
+
+  for(i=0;i<n;i++){
+    OrcTestResult ret;
+
+    printf("%s:\n", programs[i]->name);
+    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 (file)
index 0000000..8862003
--- /dev/null
@@ -0,0 +1,90 @@
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+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 <file.orc>\n");
+    exit(1);
+  }
+
+  n = orc_parse (code, &programs);
+
+  for(i=0;i<n;i++){
+    OrcTestResult ret;
+
+    printf("%s:\n", programs[i]->name);
+    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 (file)
index 0000000..730a6e6
--- /dev/null
@@ -0,0 +1,96 @@
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+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 <file.orc>\n");
+    exit(1);
+  }
+
+  n = orc_parse (code, &programs);
+
+  for(i=0;i<n;i++){
+    OrcTestResult ret;
+
+    printf("%s:\n", programs[i]->name);
+    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 (file)
index 0000000..0a8dec7
--- /dev/null
@@ -0,0 +1,444 @@
+
+#include "config.h"
+
+#include <stdio.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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;i<opcode_set->n_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;i<opcode_set->n_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;i<opcode_set->n_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;i<opcode_set->n_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;i<opcode_set->n_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;i<opcode_set->n_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;i<opcode_set->n_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 (file)
index 0000000..17ee569
--- /dev/null
@@ -0,0 +1,92 @@
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+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 <file.orc>\n");
+    exit(1);
+  }
+
+  n = orc_parse (code, &programs);
+
+  for(i=0;i<n;i++){
+    if (verbose) printf("%s\n", programs[i]->name);
+    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 (file)
index 0000000..2de7e81
--- /dev/null
@@ -0,0 +1,102 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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;i<opcode_set->n_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 (file)
index 0000000..fb7fb0c
--- /dev/null
@@ -0,0 +1,113 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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(
+"<table frame=\"all\" id=\"table-basictypes\" xreflabel=\"Table of Opcode Rule Coverage\">\n"
+"<title>Table of Opcode Rule Coverage</title>\n"
+"<tgroup cols=\"%d\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n"
+"<thead>\n"
+"<row>\n"
+"<entry>opcode name</entry>\n", n_targets+1);
+    for(j=0;j<n_targets;j++){
+      printf("<entry>%s</entry>\n",
+        orc_target_get_name(targets[j]));
+    }
+  printf(
+"</row>\n"
+"</thead>\n"
+"<tbody valign=\"top\">\n");
+
+  opcode_set = orc_opcode_set_get ("sys");
+
+  for(i=0;i<opcode_set->n_opcodes;i++){
+    printf("<row>\n");
+    printf("<entry>%s</entry>\n", opcode_set->opcodes[i].name);
+    for(j=0;j<n_targets;j++){
+      printf("<entry>%s</entry>\n",
+        test_opcode (opcode_set->opcodes + i, targets[j], target_flags[j]));
+    }
+    printf("</row>\n");
+  }
+  printf(
+"</tbody>\n"
+"</tgroup>\n"
+"</table>\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 (file)
index 0000000..750d840
--- /dev/null
@@ -0,0 +1,288 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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(
+"<table frame=\"all\" id=\"table-basictypes\" xreflabel=\"Table of Opcodes\">\n"
+"<title>Table of Opcodes</title>\n"
+"<tgroup cols=\"3\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n"
+"<thead>\n"
+"<row>\n"
+"<entry>opcode</entry>\n"
+"<entry>destination size</entry>\n"
+"<entry>source 1 size</entry>\n"
+"<entry>source 2 size</entry>\n"
+"<entry>description</entry>\n"
+"<entry>pseudo code</entry>\n"
+"</row>\n"
+"</thead>\n"
+"<tbody valign=\"top\">\n");
+
+  opcode_set = orc_opcode_set_get ("sys");
+
+  for(i=0;i<opcode_set->n_opcodes;i++){
+    printf("<row>\n");
+    printf("<entry>%s</entry>\n", opcode_set->opcodes[i].name);
+    printf("<entry>%d</entry>\n", opcode_set->opcodes[i].dest_size[0]);
+    printf("<entry>%d</entry>\n", opcode_set->opcodes[i].src_size[0]);
+    if (opcode_set->opcodes[i].src_size[1]) {
+      printf("<entry>%d%s</entry>\n", opcode_set->opcodes[i].src_size[1],
+          (opcode_set->opcodes[i].flags & ORC_STATIC_OPCODE_SCALAR) ? "S" : "");
+    } else {
+      printf("<entry></entry>\n");
+    }
+    printf("<entry>%s</entry>\n", get_desc(&opcode_set->opcodes[i]));
+    printf("<entry>%s</entry>\n", get_code(&opcode_set->opcodes[i]));
+    printf("</row>\n");
+  }
+  printf(
+"</tbody>\n"
+"</tgroup>\n"
+"</table>\n");
+
+  return 0;
+}
+
+struct a {
+  char *name;
+  char *code;
+  char *desc;
+};
+
+struct a ops[] = {
+  { "absb", "(a &lt; 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 &amp; b", "bitwise AND" },
+  { "andnb", "a &amp; (~b)", "bitwise AND NOT" },
+  { "avgsb", "(a + b + 1)&gt;&gt;1", "signed average" },
+  { "avgub", "(a + b + 1)&gt;&gt;1", "unsigned average" },
+  { "cmpeqb", "(a == b) ? (~0) : 0", "compare equal" },
+  { "cmpgtsb", "(a &gt; b) ? (~0) : 0", "compare greater than" },
+  { "copyb", "a", "copy" },
+  { "maxsb", "(a &gt; b) ? a : b", "signed maximum" },
+  { "maxub", "(a &gt; b) ? a : b", "unsigned maximum" },
+  { "minsb", "(a &lt; b) ? a : b", "signed minimum" },
+  { "minub", "(a &lt; b) ? a : b", "unsigned minimum" },
+  { "mullb", "a * b", "low bits of multiply" },
+  { "mulhsb", "(a * b) &gt;&gt; 8", "high bits of signed multiply" },
+  { "mulhub", "(a * b) &gt;&gt; 8", "high bits of unsigned multiply" },
+  { "orb", "a | b", "bitwise or" },
+  { "shlb", "a &lt;&lt; b", "shift left" },
+  { "shrsb", "a &gt;&gt; b", "signed shift right" },
+  { "shrub", "a &gt;&gt; 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 &lt; 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 &amp; b", "bitwise AND" },
+  { "andnw", "a &amp; (~b)", "bitwise AND NOT" },
+  { "avgsw", "(a + b + 1)&gt;&gt;1", "signed average" },
+  { "avguw", "(a + b + 1)&gt;&gt;1", "unsigned average" },
+  { "cmpeqw", "(a == b) ? (~0) : 0", "compare equal" },
+  { "cmpgtsw", "(a &gt; b) ? (~0) : 0", "compare greater than" },
+  { "copyw", "a", "copy" },
+  { "maxsw", "(a &gt; b) ? a : b", "signed maximum" },
+  { "maxuw", "(a &gt; b) ? a : b", "unsigned maximum" },
+  { "minsw", "(a &lt; b) ? a : b", "signed minimum" },
+  { "minuw", "(a &lt; b) ? a : b", "unsigned minimum" },
+  { "mullw", "a * b", "low bits of multiply" },
+  { "mulhsw", "(a * b) &gt;&gt; 8", "high bits of signed multiply" },
+  { "mulhuw", "(a * b) &gt;&gt; 8", "high bits of unsigned multiply" },
+  { "orw", "a | b", "bitwise or" },
+  { "shlw", "a &lt;&lt; b", "shift left" },
+  { "shrsw", "a &gt;&gt; b", "signed shift right" },
+  { "shruw", "a &gt;&gt; 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 &lt; 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 &amp; b", "bitwise AND" },
+  { "andnl", "a &amp; (~b)", "bitwise AND NOT" },
+  { "avgsl", "(a + b + 1)&gt;&gt;1", "signed average" },
+  { "avgul", "(a + b + 1)&gt;&gt;1", "unsigned average" },
+  { "cmpeql", "(a == b) ? (~0) : 0", "compare equal" },
+  { "cmpgtsl", "(a &gt; b) ? (~0) : 0", "compare greater than" },
+  { "copyl", "a", "copy" },
+  { "maxsl", "(a &gt; b) ? a : b", "signed maximum" },
+  { "maxul", "(a &gt; b) ? a : b", "unsigned maximum" },
+  { "minsl", "(a &lt; b) ? a : b", "signed minimum" },
+  { "minul", "(a &lt; b) ? a : b", "unsigned minimum" },
+  { "mulll", "a * b", "low bits of multiply" },
+  { "mulhsl", "(a * b) &gt;&gt; 16", "high bits of signed multiply" },
+  { "mulhul", "(a * b) &gt;&gt; 16", "high bits of unsigned multiply" },
+  { "orl", "a | b", "bitwise or" },
+  { "shll", "a &lt;&lt; b", "shift left" },
+  { "shrsl", "a &gt;&gt; b", "signed shift right" },
+  { "shrul", "a &gt;&gt; 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 &amp; 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;i<sizeof(ops)/sizeof(ops[0]);i++){
+    if (strcmp (opcode->name, ops[i].name) == 0) {
+      return ops[i].desc;
+    }
+  }
+  return "";
+}
+
+char *
+get_code (OrcStaticOpcode *opcode)
+{
+  int i;
+  for(i=0;i<sizeof(ops)/sizeof(ops[0]);i++){
+    if (strcmp (opcode->name, 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 (file)
index 0000000..25f96a9
--- /dev/null
@@ -0,0 +1,174 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#define ORC_ENABLE_UNSTABLE_API
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc-test/orcprofile.h>
+
+
+#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<n;i++){
+    sum += ptr[i];
+  }
+}
+
+int
+main(int argc, char *argv[])
+{
+  char *s, *d;
+  orc_uint8 *src, *dest;
+  OrcProfile prof;
+  OrcProfile prof_libc;
+  double ave, std;
+  double ave_libc, std_libc;
+  double null;
+  int i,j;
+  double cpufreq;
+  int unalign;
+  OrcProgram *p;
+  int level1, level2, level3;
+  int max;
+  //const uint8_t zero = 0;
+
+  orc_init ();
+
+  //cpufreq = 2333e6;
+  cpufreq = 1;
+
+  if (argc > 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;i<max;i++){
+    double x = i*0.1 + 6.0;
+    int size = pow(2.0, x);
+
+    if (flush_cache) {
+      touch (src, (1<<18));
+    }
+    if (hot_src) {
+      touch (src, size);
+    }
+    if (hot_dest) {
+      touch (dest, size);
+    }
+
+    orc_profile_init (&prof);
+    for(j=0;j<10;j++){
+      OrcExecutor _ex, *ex = &_ex;
+      void (*func) (OrcExecutor *);
+
+      orc_profile_start(&prof);
+      //orc_memcpy (dest, src, size);
+      ex->program = 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<<i), cpufreq/(ave/(1<<i)),
+    //    cpufreq/(ave_libc/(1<<i)));
+    printf("%g %10.4g %10.4g\n", x,
+        cpufreq/(ave/size), cpufreq/(ave_libc/size));
+    //printf("%g %10.4g %10.4g\n", x,
+    //    32*(ave/(size)), 32*(ave_libc/(size)));
+    fflush (stdout);
+  }
+
+  return 0;
+}
+
diff --git a/testsuite/orcc/Makefile.am b/testsuite/orcc/Makefile.am
new file mode 100644 (file)
index 0000000..41134fc
--- /dev/null
@@ -0,0 +1,30 @@
+
+if CROSS_COMPILING
+else
+TESTS = orc_test test2 test3
+
+noinst_PROGRAMS = orc_test test2 test3
+
+BUILT_SOURCES = testorc.c testorc.h orc_test.c
+endif
+
+test2_SOURCES = test2.c testorc.c
+
+test3_SOURCES = test3.c testorc.c
+test3_CFLAGS = -DDISABLE_ORC
+
+AM_CFLAGS = $(ORC_CFLAGS)
+LIBS = $(ORC_LIBS) $(top_builddir)/orc-test/liborc-test-@ORC_MAJORMINOR@.la
+
+CLEANFILES = testorc.c testorc.h orc_test.c
+
+testorc.h: $(srcdir)/../test.orc
+       $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --header -o testorc.h $<
+
+testorc.c: $(srcdir)/../test.orc
+       $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --implementation -o testorc.c $<
+
+orc_test.c: $(srcdir)/../test.orc
+       $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --test -o orc_test.c $<
+
+
diff --git a/testsuite/orcc/Makefile.in b/testsuite/orcc/Makefile.in
new file mode 100644 (file)
index 0000000..4a681c8
--- /dev/null
@@ -0,0 +1,656 @@
+# 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@
+@CROSS_COMPILING_FALSE@TESTS = orc_test$(EXEEXT) test2$(EXEEXT) \
+@CROSS_COMPILING_FALSE@        test3$(EXEEXT)
+@CROSS_COMPILING_FALSE@noinst_PROGRAMS = orc_test$(EXEEXT) \
+@CROSS_COMPILING_FALSE@        test2$(EXEEXT) test3$(EXEEXT)
+subdir = testsuite/orcc
+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)
+orc_test_SOURCES = orc_test.c
+orc_test_OBJECTS = orc_test.$(OBJEXT)
+orc_test_LDADD = $(LDADD)
+am_test2_OBJECTS = test2.$(OBJEXT) testorc.$(OBJEXT)
+test2_OBJECTS = $(am_test2_OBJECTS)
+test2_LDADD = $(LDADD)
+am_test3_OBJECTS = test3-test3.$(OBJEXT) test3-testorc.$(OBJEXT)
+test3_OBJECTS = $(am_test3_OBJECTS)
+test3_LDADD = $(LDADD)
+test3_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(test3_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 = orc_test.c $(test2_SOURCES) $(test3_SOURCES)
+DIST_SOURCES = orc_test.c $(test2_SOURCES) $(test3_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+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@
+@CROSS_COMPILING_FALSE@BUILT_SOURCES = testorc.c testorc.h orc_test.c
+test2_SOURCES = test2.c testorc.c
+test3_SOURCES = test3.c testorc.c
+test3_CFLAGS = -DDISABLE_ORC
+AM_CFLAGS = $(ORC_CFLAGS)
+CLEANFILES = testorc.c testorc.h orc_test.c
+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 testsuite/orcc/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu testsuite/orcc/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
+orc_test$(EXEEXT): $(orc_test_OBJECTS) $(orc_test_DEPENDENCIES) 
+       @rm -f orc_test$(EXEEXT)
+       $(LINK) $(orc_test_OBJECTS) $(orc_test_LDADD) $(LIBS)
+test2$(EXEEXT): $(test2_OBJECTS) $(test2_DEPENDENCIES) 
+       @rm -f test2$(EXEEXT)
+       $(LINK) $(test2_OBJECTS) $(test2_LDADD) $(LIBS)
+test3$(EXEEXT): $(test3_OBJECTS) $(test3_DEPENDENCIES) 
+       @rm -f test3$(EXEEXT)
+       $(test3_LINK) $(test3_OBJECTS) $(test3_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orc_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test3-test3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test3-testorc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testorc.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 $@ $<
+
+test3-test3.o: test3.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test3_CFLAGS) $(CFLAGS) -MT test3-test3.o -MD -MP -MF $(DEPDIR)/test3-test3.Tpo -c -o test3-test3.o `test -f 'test3.c' || echo '$(srcdir)/'`test3.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/test3-test3.Tpo $(DEPDIR)/test3-test3.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test3.c' object='test3-test3.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) $(test3_CFLAGS) $(CFLAGS) -c -o test3-test3.o `test -f 'test3.c' || echo '$(srcdir)/'`test3.c
+
+test3-test3.obj: test3.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test3_CFLAGS) $(CFLAGS) -MT test3-test3.obj -MD -MP -MF $(DEPDIR)/test3-test3.Tpo -c -o test3-test3.obj `if test -f 'test3.c'; then $(CYGPATH_W) 'test3.c'; else $(CYGPATH_W) '$(srcdir)/test3.c'; fi`
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/test3-test3.Tpo $(DEPDIR)/test3-test3.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test3.c' object='test3-test3.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) $(test3_CFLAGS) $(CFLAGS) -c -o test3-test3.obj `if test -f 'test3.c'; then $(CYGPATH_W) 'test3.c'; else $(CYGPATH_W) '$(srcdir)/test3.c'; fi`
+
+test3-testorc.o: testorc.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test3_CFLAGS) $(CFLAGS) -MT test3-testorc.o -MD -MP -MF $(DEPDIR)/test3-testorc.Tpo -c -o test3-testorc.o `test -f 'testorc.c' || echo '$(srcdir)/'`testorc.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/test3-testorc.Tpo $(DEPDIR)/test3-testorc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testorc.c' object='test3-testorc.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) $(test3_CFLAGS) $(CFLAGS) -c -o test3-testorc.o `test -f 'testorc.c' || echo '$(srcdir)/'`testorc.c
+
+test3-testorc.obj: testorc.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test3_CFLAGS) $(CFLAGS) -MT test3-testorc.obj -MD -MP -MF $(DEPDIR)/test3-testorc.Tpo -c -o test3-testorc.obj `if test -f 'testorc.c'; then $(CYGPATH_W) 'testorc.c'; else $(CYGPATH_W) '$(srcdir)/testorc.c'; fi`
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/test3-testorc.Tpo $(DEPDIR)/test3-testorc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testorc.c' object='test3-testorc.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) $(test3_CFLAGS) $(CFLAGS) -c -o test3-testorc.obj `if test -f 'testorc.c'; then $(CYGPATH_W) 'testorc.c'; else $(CYGPATH_W) '$(srcdir)/testorc.c'; fi`
+
+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
+
+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
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+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 check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS 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
+
+
+testorc.h: $(srcdir)/../test.orc
+       $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --header -o testorc.h $<
+
+testorc.c: $(srcdir)/../test.orc
+       $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --implementation -o testorc.c $<
+
+orc_test.c: $(srcdir)/../test.orc
+       $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --test -o orc_test.c $<
+
+# 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/orcc/orc_test.c b/testsuite/orcc/orc_test.c
new file mode 100644 (file)
index 0000000..03a5fb7
--- /dev/null
@@ -0,0 +1,16341 @@
+
+/* autogenerated from test.orc */
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+#include <stdint.h>
+
+#ifndef _ORC_INTEGER_TYPEDEFS_
+#define _ORC_INTEGER_TYPEDEFS_
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <stdint.h>
+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 <limits.h>
+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<argc;i++) {
+    if (strcmp(argv[i], "--help") == 0 ||
+      strcmp(argv[i], "-h") == 0) {
+      help(argv[0]);
+    } else if (strcmp(argv[i], "--quiet") == 0 ||
+      strcmp(argv[i], "-q") == 0) {
+      quiet = 1;
+      benchmark = 0;
+    } else if (strcmp(argv[i], "--benchmark") == 0 ||
+      strcmp(argv[i], "-b") == 0) {
+      benchmark = 1;
+      quiet = 0;
+    }
+  }
+
+  /* orc_add2_rshift_add_s16_22_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_add_s16_22_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add2_rshift_add_s16_22 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_add_s16_22:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add2_rshift_sub_s16_22_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_sub_s16_22_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add2_rshift_sub_s16_22 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_sub_s16_22:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add2_rshift_add_s16_11_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_add_s16_11_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add2_rshift_add_s16_11 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_add_s16_11:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add2_rshift_sub_s16_11_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_sub_s16_11_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add2_rshift_sub_s16_11 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add2_rshift_sub_s16_11:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add_const_rshift_s16_11 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add_const_rshift_s16_11:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add_const_rshift_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add_const_rshift_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add_s16_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add_s16_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_addc_rshift_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_addc_rshift_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_lshift1_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_lshift1_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_lshift2_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_lshift2_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_lshift_s16_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_lshift_s16_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas2_add_s16_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas2_add_s16_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas2_add_s16_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas2_add_s16_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas2_sub_s16_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas2_sub_s16_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas2_sub_s16_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas2_sub_s16_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas4_across_add_s16_1991_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas4_across_add_s16_1991_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas4_across_add_s16_1991_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas4_across_add_s16_1991_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas4_across_sub_s16_1991_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas4_across_sub_s16_1991_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_mas4_across_sub_s16_1991_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_mas4_across_sub_s16_1991_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_subtract_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_subtract_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add_s16_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add_s16_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_add_s16_u8_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_add_s16_u8_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_convert_s16_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_convert_s16_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_convert_u8_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_convert_u8_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_offsetconvert_u8_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_offsetconvert_u8_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_offsetconvert_s16_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_offsetconvert_s16_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_subtract_s16_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_subtract_s16_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_multiply_and_add_s16_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_multiply_and_add_s16_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_s16_ns */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_s16_ns:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_s16_2d_4xn */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_s16_2d_4xn:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_s16_2d_8xn */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_s16_2d_8xn:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_s16_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_s16_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_u8_ns */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_u8_ns:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_u8_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_u8_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_average_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_average_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_rrshift6_add_s16_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_rrshift6_add_s16_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_rrshift6_sub_s16_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_rrshift6_sub_s16_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_rrshift6_s16_ip_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_rrshift6_s16_ip_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_rrshift6_s16_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_rrshift6_s16_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_unpack_yuyv_y */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_unpack_yuyv_y:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_unpack_yuyv_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_unpack_yuyv_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_unpack_yuyv_v */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_unpack_yuyv_v:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_packyuyv */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_packyuyv:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_unpack_uyvy_y */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_unpack_uyvy_y:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_unpack_uyvy_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_unpack_uyvy_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_unpack_uyvy_v */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_unpack_uyvy_v:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_interleave2_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_interleave2_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_interleave2_rrshift1_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_interleave2_rrshift1_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_deinterleave2_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_deinterleave2_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_deinterleave2_lshift1_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_deinterleave2_lshift1_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_deint_lshift1_split_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_deint_lshift1_split_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_deint_split_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_deint_split_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_split_s16_lo */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_split_s16_lo:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_split_s16_hi */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_split_s16_hi:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_split_s16_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_split_s16_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_split_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_split_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_synth_s16_lo */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_synth_s16_lo:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_synth_s16_hi */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_synth_s16_hi:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_synth_s16_op */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_synth_s16_op:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_synth_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_synth_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_synth_rrshift1_int_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_synth_rrshift1_int_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_synth_int_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_synth_int_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_sub_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_sub_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_add_half_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_add_half_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_add_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_add_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_haar_sub_half_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_haar_sub_half_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sum_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sum_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sum_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sum_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sum_square_diff_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sum_square_diff_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_dequantise_s16_2d_4xn */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_dequantise_s16_2d_4xn:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_dequantise_s16_2d_8xn */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_dequantise_s16_2d_8xn:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_dequantise_s16_ip_2d_8xn */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_dequantise_s16_ip_2d_8xn:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_dequantise_s16_ip_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_dequantise_s16_ip_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_dequantise_s16_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_dequantise_s16_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_dequantise_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_dequantise_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_dequantise_var_s16_ip */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_dequantise_var_s16_ip:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_quantise1_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_quantise1_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_quantise2_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_quantise2_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_quantdequant1_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_quantdequant1_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_quantdequant3_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_quantdequant3_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_quantdequant2_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_quantdequant2_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_downsample_vert_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_downsample_vert_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_downsample_horiz_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_downsample_horiz_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_stats_moment_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_stats_moment_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_stats_above_s16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_stats_above_s16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_accw */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_accw:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_avg2_8xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_avg2_8xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_avg2_12xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_avg2_12xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_avg2_16xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_avg2_16xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_avg2_32xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_avg2_32xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_avg2_nxm_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_avg2_nxm_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine4_8xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine4_8xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine4_12xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine4_12xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine4_16xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine4_16xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine4_24xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine4_24xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine4_32xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine4_32xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine4_nxm_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine4_nxm_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine2_8xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine2_8xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine2_12xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine2_12xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine2_16xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine2_16xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_combine2_nxm_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_combine2_nxm_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sad_nxm_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sad_nxm_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sad_8x8_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sad_8x8_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sad_12x12_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sad_12x12_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sad_16xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sad_16xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_sad_32xn_u8 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_sad_32xn_u8:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* convert_rgb_to_gray */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("convert_rgb_to_gray:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* canny_calc_delta_x */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("canny_calc_delta_x:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* i420_to_ayuv */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("i420_to_ayuv:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* test_4x */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("test_4x:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* test_4x_2 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("test_4x_2:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_u16 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_u16:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_u32 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_u32:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_u16_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_u16_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_splat_u32_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_splat_u32_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_copy_u16_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_copy_u16_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_copy_u32_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_copy_u32_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_composite_add_8888_8888_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_composite_add_8888_8888_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_composite_add_8_8_line */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_composite_add_8_8_line:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_composite_add_n_8_8_line */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_composite_add_n_8_8_line:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_add_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_add_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_add_u_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_add_u_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_over_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_over_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_over_u_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_over_u_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_in_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_in_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_in_u_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_in_u_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_out_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_out_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_out_u_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_out_u_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_atop_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_atop_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_atop_u_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_atop_u_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_xor_u */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_xor_u:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_xor_u_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_xor_u_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_add_ca */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_add_ca:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_add_ca_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_add_ca_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_over_ca */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_over_ca:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_code_combine_over_ca_n */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_code_combine_over_ca_n:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_composite_over_8888_8_8888_line */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_composite_over_8888_8_8888_line:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* orc_composite_over_n_8888_8888_ca_2d */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("orc_composite_over_n_8888_8888_ca_2d:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* cogorc_resample_horiz_1tap */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("cogorc_resample_horiz_1tap:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* cogorc_resample_horiz_2tap */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("cogorc_resample_horiz_2tap:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* test_float_constant_1 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("test_float_constant_1:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* test_float_constant_2 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("test_float_constant_2:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* convert_fc32_to_int32 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("convert_fc32_to_int32:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* param64 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("param64:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* const64 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("const64:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* param64_2 */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("param64_2:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+  /* pa_volume_s16ne_orc_2ch */
+  {
+    OrcProgram *p = NULL;
+    int ret;
+
+    if (!quiet)      printf ("pa_volume_s16ne_orc_2ch:\n");
+    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);
+
+    if (benchmark) {
+      printf ("    cycles (emulate) :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
+    }
+
+    ret = orc_test_compare_output_backup (p);
+    if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    backup function  :   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (backup)  :   %g\n",
+          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
+    }
+
+    ret = orc_test_compare_output (p);
+    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
+      printf ("    compiled function:   COMPILE FAILED\n");
+    } else if (!ret) {
+      error = TRUE;
+    } else if (!quiet) {
+      printf ("    compiled function:   PASSED\n");
+    }
+
+    if (benchmark) {
+      printf ("    cycles (compiled):   %g\n",
+          orc_test_performance_full (p, 0, NULL));
+    }
+
+    orc_program_free (p);
+  }
+
+
+  if (error) {
+    return 1;
+  };
+  return 0;
+}
diff --git a/testsuite/orcc/test2.c b/testsuite/orcc/test2.c
new file mode 100644 (file)
index 0000000..eee43c8
--- /dev/null
@@ -0,0 +1,12 @@
+
+#include <stdio.h>
+
+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 (file)
index 0000000..eee43c8
--- /dev/null
@@ -0,0 +1,12 @@
+
+#include <stdio.h>
+
+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 (file)
index 0000000..a4b3c0b
--- /dev/null
@@ -0,0 +1,22743 @@
+
+/* autogenerated from test.orc */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifndef DISABLE_ORC
+#include <orc/orc.h>
+#endif
+#include <stdint.h>
+
+#ifndef _ORC_INTEGER_TYPEDEFS_
+#define _ORC_INTEGER_TYPEDEFS_
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <stdint.h>
+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 <limits.h>
+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 (file)
index 0000000..d077289
--- /dev/null
@@ -0,0 +1,46 @@
+
+#include "config.h"
+
+#include <stdio.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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;i<opcode_set->n_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 (file)
index 0000000..1fdf76f
--- /dev/null
@@ -0,0 +1,81 @@
+
+#include "config.h"
+
+#include <stdio.h>
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+
+
+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;i<opcode_set->n_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 (file)
index 0000000..731c142
--- /dev/null
@@ -0,0 +1,91 @@
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+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 <file.orc>\n");
+    exit(1);
+  }
+
+  n = orc_parse (code, &programs);
+
+  for(i=0;i<n;i++){
+    printf("%-30s %g\n", programs[i]->name,
+        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 (file)
index 0000000..c0d4d76
--- /dev/null
@@ -0,0 +1,94 @@
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+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 <file.orc>\n");
+    exit(1);
+  }
+
+  n = orc_parse (code, &programs);
+
+  for(i=0;i<n;i++){
+    double perf_mmx;
+    double perf_sse;
+    perf_mmx = orc_test_performance_full (programs[i], 0, "mmx");
+    perf_sse = orc_test_performance_full (programs[i], 0, "sse");
+    printf("%g %g\n", perf_mmx, perf_sse);
+  }
+
+  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/show_parse.c b/testsuite/show_parse.c
new file mode 100644 (file)
index 0000000..f6f9daa
--- /dev/null
@@ -0,0 +1,394 @@
+
+#define ORC_ENABLE_UNSTABLE_API
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc-test/orcarray.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+#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<argc;i++){
+    if (strcmp("-x", argv[i]) == 0) {
+      format = FORMAT_HEX;
+    } else if (strcmp("-s", argv[i]) == 0) {
+      format = FORMAT_SIGNED;
+    } else if (strcmp("-u", argv[i]) == 0) {
+      format = FORMAT_UNSIGNED;
+    } else if (strcmp("-f", argv[i]) == 0) {
+      format = FORMAT_FLOAT;
+    } else if (strcmp("-n", argv[i]) == 0) {
+      if (i + 1 < argc) {
+        array_n = strtol (argv[i+1], NULL, 0);
+        i++;
+      }
+    } else {
+      filename = argv[i];
+    }
+  }
+
+  if (filename == NULL) {
+    filename = getenv ("testfile");
+  }
+  if (filename == NULL) {
+    filename = "test.orc";
+  }
+  code = read_file (filename);
+  if (code) {
+    n = orc_parse (code, &programs);
+  } else {
+    OrcStaticOpcode *opcode;
+
+    opcode = orc_opcode_find_by_name (filename);
+    if (opcode) {
+      programs = malloc(sizeof(void *));
+      programs[0] = orc_test_get_program_for_opcode (opcode);
+      n = 1;
+    } else {
+      printf("show_parse [-fsux] (<file.orc>|opcode)\n");
+      exit(1);
+    }
+  }
+
+  for(i=0;i<n;i++){
+    show (programs[i]);
+  }
+
+  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;
+}
+
+int
+print_array_val_signed (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(" %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;i<ORC_N_VARIABLES;i++){
+    if (program->vars[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;j<ORC_N_VARIABLES;j++){
+    if (program->vars[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;j<m;j++){
+      for(i=0;i<n;i++){
+        int l;
+
+        printf("%2d %2d:", i, j);
+
+        for(l=ORC_VAR_S1;l<ORC_VAR_S1+8;l++){
+          if (program->vars[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;l<ORC_VAR_D1+4;l++){
+          if (program->vars[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 (file)
index 0000000..148b53d
--- /dev/null
@@ -0,0 +1,246 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <orc/orc.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <orc-test/orctest.h>
+
+
+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 (file)
index 0000000..ca30e21
--- /dev/null
@@ -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 (file)
index 0000000..1388045
--- /dev/null
@@ -0,0 +1,91 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <orc/orc.h>
+#include <orc/orcdebug.h>
+
+
+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<n;i++){
+      array1[i] = rand();
+      array2[i] = rand();
+      sum += abs(array1[i] - array2[i]);
+    }
+    if (sum != orc_sad_u8 (array1, array2, n)) {
+      for(i=0;i<n;i++){
+        printf("%d: %d %d -> %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 (file)
index 0000000..fd303be
--- /dev/null
@@ -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 (file)
index 0000000..c49943f
--- /dev/null
@@ -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 (file)
index 0000000..359b3d9
--- /dev/null
@@ -0,0 +1,557 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+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<argc;i++){
+    if (strcmp(argv[i], "--help") == 0) {
+      printf("Usage:\n");
+      printf("  orc-bugreport [file.orc]\n");
+      printf("\n");
+      printf("Options:\n");
+      printf("  --help                    Show help options\n");
+      printf("  --verbose                 Increase debugging messages\n");
+      printf("\n");
+      printf("Environment Variables:\n");
+      printf("  ORC_DEBUG=<LEVEL>         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<<i)) {
+        printf("%s ", orc_target_get_flag_name (orc_target_get_default(), i));
+      }
+    }
+    printf("\n");
+  }
+
+  if (filename) {
+    int n;
+    int ret;
+    char *code;
+
+    code = read_file (filename);
+    if (!code) {
+      printf("orc-bugreport: could not read file %s\n", filename);
+      exit(1);
+    }
+
+    printf("Parsing %s\n", filename);
+    n = orc_parse (code, &programs);
+
+    for(i=0;i<n;i++){
+      ret = orc_test_compare_output_full (programs[i], 0);
+      if (!ret) {
+        printf("FAIL: %s\n", programs[i]->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;i<opcode_set->n_opcodes;i++){
+    test_opcode_src (opcode_set->opcodes + i);
+  }
+  for(i=0;i<opcode_set->n_opcodes;i++){
+    test_opcode_const (opcode_set->opcodes + i);
+  }
+  for(i=0;i<opcode_set->n_opcodes;i++){
+    test_opcode_param (opcode_set->opcodes + i);
+  }
+  for(i=0;i<opcode_set->n_opcodes;i++){
+    test_opcode_inplace (opcode_set->opcodes + i);
+  }
+  for(i=0;i<opcode_set->n_opcodes;i++){
+    test_opcode_src_2d (opcode_set->opcodes + i);
+  }
+  for(i=0;i<opcode_set->n_opcodes;i++){
+    test_opcode_src_const_n (opcode_set->opcodes + i);
+  }
+  for(i=0;i<opcode_set->n_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 (file)
index 0000000..f6a3f3a
--- /dev/null
@@ -0,0 +1,1183 @@
+
+#include "config.h"
+
+#include <orc/orc.h>
+#include <orc/orcparse.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+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 <FILE> 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<argc;i++) {
+    if (strcmp(argv[i], "--header") == 0) {
+      mode = MODE_HEADER;
+    } else if (strcmp(argv[i], "--implementation") == 0) {
+      mode = MODE_IMPL;
+    } else if (strcmp(argv[i], "--test") == 0) {
+      mode = MODE_TEST;
+    } else if (strcmp(argv[i], "--assembly") == 0) {
+      mode = MODE_ASSEMBLY;
+    } else if (strcmp(argv[i], "--include") == 0) {
+      if (i+1 < argc) {
+        include_file = argv[i+1];
+        i++;
+      } else {
+        help();
+      }
+    } else if (strcmp (argv[i], "--output") == 0 ||
+        strcmp(argv[i], "-o") == 0) {
+      if (i+1 < argc) {
+        output_file = argv[i+1];
+        i++;
+      } else {
+        help();
+      }
+    } else if (strcmp(argv[i], "--target") == 0 ||
+        strcmp(argv[i], "-t") == 0) {
+      if (i+1 < argc) {
+        target = argv[i+1];
+        i++;
+      } else {
+      }
+    } else if (strcmp(argv[i], "--inline") == 0) {
+      use_inline = TRUE;
+    } else if (strcmp(argv[i], "--no-inline") == 0) {
+      use_inline = FALSE;
+    } else if (strcmp(argv[i], "--init-function") == 0) {
+      if (i+1 < argc) {
+        init_function = argv[i+1];
+        i++;
+      } else {
+        help();
+      }
+    } else if (strcmp(argv[i], "--help") == 0 ||
+        strcmp(argv[i], "-h") == 0) {
+      help ();
+    } else if (strcmp(argv[i], "--verbose") == 0 ||
+        strcmp(argv[i], "-v") == 0) {
+      verbose = 1;
+    } else if (strcmp(argv[i], "--version") == 0) {
+      printf("Orc Compiler " PACKAGE_VERSION "\n");
+      exit (0);
+    } else if (strcmp(argv[i], "--compat") == 0) {
+      if (i+1 < argc) {
+        compat_version = argv[i+1];
+        i++;
+      } else {
+        help();
+      }
+    } else if (strncmp(argv[i], "-", 1) == 0) {
+      printf("Unknown option: %s\n", argv[i]);
+      exit (1);
+    } else {
+      if (input_file == NULL) {
+        input_file = argv[i];
+      } else {
+        printf("More than one input file specified: %s\n", argv[i]);
+        exit (1);
+      }
+    }
+  }
+
+  if (input_file == NULL) {
+    printf("No input file specified\n");
+    exit (1);
+  }
+
+  if (mode == MODE_ASSEMBLY && orc_target_get_by_name (target) == NULL) {
+    printf("Unknown target \"%s\"\n", target);
+    exit (1);
+  }
+
+  if (compat_version) {
+    int major, minor, micro, nano = 0;
+    int n;
+
+    n = sscanf (compat_version, "%d.%d.%d.%d", &major, &minor, &micro, &nano);
+
+    if (n < 3) {
+      printf("Unknown version \"%s\"\n", compat_version);
+      exit (1);
+    }
+
+    compat = ORC_VERSION(major,minor,micro,nano);
+    if (compat < ORC_VERSION(0,4,5,0)) {
+      printf("Compatibility version \"%s\" not supported.  Minimum 0.4.5\n",
+          compat_version);
+      exit (1);
+    }
+  }
+
+  if (output_file == NULL) {
+    switch (mode) {
+      case MODE_IMPL:
+        output_file = "out.c";
+        break;
+      case MODE_HEADER:
+        output_file = "out.h";
+        break;
+      case MODE_TEST:
+        output_file = "out_test.c";
+        break;
+      case MODE_ASSEMBLY:
+        output_file = "out.s";
+        break;
+    }
+  }
+
+  code = read_file (input_file);
+  if (!code) {
+    printf("Could not read input file: %s\n", input_file);
+    exit(1);
+  }
+
+  n = orc_parse_full (code, &programs, &log);
+  n_programs = n;
+  printf("%s", log);
+
+  if (init_function == NULL) {
+    init_function = orc_parse_get_init_function (programs[0]);
+  }
+
+  output = fopen (output_file, "w");
+  if (!output) {
+    printf("Could not write output file: %s\n", output_file);
+    exit(1);
+  }
+
+  fprintf(output, "\n");
+  fprintf(output, "/* autogenerated from %s */\n", my_basename(input_file));
+  fprintf(output, "\n");
+
+  if (mode == MODE_IMPL) {
+    fprintf(output, "#ifdef HAVE_CONFIG_H\n");
+    fprintf(output, "#include \"config.h\"\n");
+    fprintf(output, "#endif\n");
+    fprintf(output, "#ifndef DISABLE_ORC\n");
+    fprintf(output, "#include <orc/orc.h>\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;i++){
+      output_code_header (programs[i], output);
+    }
+    if (init_function) {
+      fprintf(output, "\n");
+      fprintf(output, "void %s (void);\n", init_function);
+    }
+    fprintf(output, "\n");
+    fprintf(output, "%s", orc_target_get_asm_preamble ("c"));
+    fprintf(output, "\n");
+    for(i=0;i<n;i++){
+      output_code (programs[i], output);
+    }
+    fprintf(output, "\n");
+    if (init_function) {
+      output_init_function (output);
+      fprintf(output, "\n");
+    }
+  } else if (mode == MODE_HEADER) {
+    char *barrier = get_barrier (output_file);
+
+    fprintf(output, "#ifndef _%s_\n", barrier);
+    fprintf(output, "#define _%s_\n", barrier);
+    free (barrier);
+    fprintf(output, "\n");
+    if (include_file) {
+      fprintf(output, "#include <%s>\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;i++){
+        output_code_header (programs[i], output);
+      }
+    } else {
+      fprintf(output, "\n");
+      fprintf(output, "#include <orc/orc.h>\n");
+      fprintf(output, "\n");
+      for(i=0;i<n;i++){
+        output_code_execute (programs[i], output, TRUE);
+      }
+    }
+    fprintf(output, "\n");
+    fprintf(output, "#ifdef __cplusplus\n");
+    fprintf(output, "}\n");
+    fprintf(output, "#endif\n");
+    fprintf(output, "\n");
+    fprintf(output, "#endif\n");
+    fprintf(output, "\n");
+  } else if (mode == MODE_TEST) {
+    fprintf(output, "#include <orc/orc.h>\n");
+    fprintf(output, "#include <orc-test/orctest.h>\n");
+    fprintf(output, "#include <stdio.h>\n");
+    fprintf(output, "#include <string.h>\n");
+    fprintf(output, "#include <stdlib.h>\n");
+    fprintf(output, "#include <math.h>\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;i<n;i++){
+      fprintf(output, "/* %s */\n", programs[i]->name);
+      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;i<argc;i++) {\n");
+    fprintf(output, "    if (strcmp(argv[i], \"--help\") == 0 ||\n");
+    fprintf(output, "      strcmp(argv[i], \"-h\") == 0) {\n");
+    fprintf(output, "      help(argv[0]);\n");
+    fprintf(output, "    } else if (strcmp(argv[i], \"--quiet\") == 0 ||\n");
+    fprintf(output, "      strcmp(argv[i], \"-q\") == 0) {\n");
+    fprintf(output, "      quiet = 1;\n");
+    fprintf(output, "      benchmark = 0;\n");
+    fprintf(output, "    } else if (strcmp(argv[i], \"--benchmark\") == 0 ||\n");
+    fprintf(output, "      strcmp(argv[i], \"-b\") == 0) {\n");
+    fprintf(output, "      benchmark = 1;\n");
+    fprintf(output, "      quiet = 0;\n");
+    fprintf(output, "    }\n");
+    fprintf(output, "  }\n");
+    fprintf(output, "\n");
+    for(i=0;i<n;i++){
+      output_code_test (programs[i], output);
+    }
+    fprintf(output, "\n");
+    fprintf(output, "  if (error) {\n");
+    fprintf(output, "    return 1;\n");
+    fprintf(output, "  };\n");
+    fprintf(output, "  return 0;\n");
+    fprintf(output, "}\n");
+  } else if (mode == MODE_ASSEMBLY) {
+    fprintf(output, "%s", orc_target_get_asm_preamble (target));
+    for(i=0;i<n;i++){
+      output_code_assembly (programs[i], output);
+    }
+  }
+
+  fclose (output);
+
+  if (error) {
+    remove (output_file);
+    exit(1);
+  }
+
+  return 0;
+}
+
+
+static char *
+get_barrier (const char *s)
+{
+  char *barrier;
+  int n;
+  int i;
+
+  n = strlen(s);
+  barrier = malloc (n + 1);
+  for(i=0;i<n;i++) {
+    if (isalnum (s[i])) {
+      barrier[i] = toupper(s[i]);
+    } else {
+      barrier[i] = '_';
+    }
+  }
+  barrier[n] = 0;
+
+  return barrier;
+}
+
+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;
+}
+
+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 is a special case because it didn't exist in
+     the API until 0.4.8 */
+  "47"
+};
+
+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, ", ");
+      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;i<p->n_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;i<n_programs;i++){
+    fprintf(output, "  {\n");
+    fprintf(output, "    /* %s */\n", programs[i]->name);
+    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;i<p->n_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 (file)
index 0000000..767c51b
--- /dev/null
@@ -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
+
+