summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2005-08-03 03:33:47 +0000
committerDavid Schleef <ds@schleef.org>2005-08-03 03:33:47 +0000
commit51d1229471320acad7a8d69ef1f8f5dfc723cafe (patch)
tree2b236ebe16708043a7309930c6fbec7c27a3a13e
parentc1f358f68635378f5bbdf54b066d9072e8c18a82 (diff)
downloadliboil-51d1229471320acad7a8d69ef1f8f5dfc723cafe.tar.gz
* HACKING: some notes
* configure.ac: readd _GNU_SOURCE * liboil/Makefile.am: add new dirs, create decls header * liboil/build_class_decls.c: create decls header * liboil/liboilclasses.h: new decls header * liboil/liboilinternal.h: general internal header * liboil/fb/.cvsignore: cvsignore * liboil/i386/.cvsignore: * liboil/math/.cvsignore: * liboil/motovec/.cvsignore: * liboil/ref/.cvsignore: * liboil/sse/.cvsignore: * liboil/utf8/.cvsignore: * testsuite/instruction/check-instructions.pl: minor opcode fixes
-rw-r--r--ChangeLog17
-rw-r--r--HACKING87
-rw-r--r--configure.ac7
-rw-r--r--liboil/Makefile.am18
-rw-r--r--liboil/build_class_decls.c114
-rw-r--r--liboil/fb/.cvsignore8
-rw-r--r--liboil/i386/.cvsignore8
-rw-r--r--liboil/liboilclasses.h304
-rw-r--r--liboil/liboilinternal.h36
-rw-r--r--liboil/math/.cvsignore8
-rw-r--r--liboil/motovec/.cvsignore8
-rw-r--r--liboil/ref/.cvsignore8
-rw-r--r--liboil/sse/.cvsignore8
-rw-r--r--liboil/utf8/.cvsignore8
-rwxr-xr-xtestsuite/instruction/check-instructions.pl11
15 files changed, 643 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index fab9be1..4043a0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2005-08-02 David Schleef <ds@schleef.org>
+ * HACKING: some notes
+ * configure.ac: readd _GNU_SOURCE
+ * liboil/Makefile.am: add new dirs, create decls header
+ * liboil/build_class_decls.c: create decls header
+ * liboil/liboilclasses.h: new decls header
+ * liboil/liboilinternal.h: general internal header
+ * liboil/fb/.cvsignore: cvsignore
+ * liboil/i386/.cvsignore:
+ * liboil/math/.cvsignore:
+ * liboil/motovec/.cvsignore:
+ * liboil/ref/.cvsignore:
+ * liboil/sse/.cvsignore:
+ * liboil/utf8/.cvsignore:
+ * testsuite/instruction/check-instructions.pl: minor opcode fixes
+
+2005-08-02 David Schleef <ds@schleef.org>
+
Patch from Wim Taymans adding a bunch of classes and MMX
implementations for libtheora. Heavily modified by ds.
* Makefile.am:
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..0dafeab
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,87 @@
+
+Hacking on liboil
+=================
+
+
+New Implementations
+-------------------
+
+ New implementations using gcc inline assembly code should go in
+ liboil/${arch}. New implementations that are written in C should
+ go in liboil/c. New implementations written in MMX/SSE/Altivec
+ instrinsics should go in liboil/mmx, liboil/sse, or liboil/altivec.
+
+ Implementations copied from other projects should generally be
+ given a separate directory under liboil/, similar to liboil/motovec.
+
+ Checklist for implementations:
+
+ - handle the n==0 case correctly
+
+ - handle various array alignments correctly if the vectorized
+ code has trouble loading misaligned data. Sometimes this is
+ only a problem on certain CPUs.
+
+ - unrolled loops and vectorized code needs to handle any extra
+ array elements at the end of array.
+
+ - if a class has strides, they must be followed.
+
+ Things implementations can assume:
+
+ - n will never be negative
+
+ - alignment of individual array members. For example, if the
+ type is "u32", you can assume that pointers and strides are
+ multiples of 4.
+
+ In general, if your implementation is enabled on the current CPU
+ and 'make check' passes, it's probably a clean implementation.
+
+ Broken implementations (i.e., code that is a work-in-progress)
+ are still allowed, as long as the broken code is wrapped in
+ #ifdef ENABLE_BROKEN_IMPLS/#endif.
+
+
+New Classes
+-----------
+
+ Reference implementations for new classes should go in liboil/ref.
+
+ The naming of new classes is a tricky business. The goal is to
+ make the name short, easy to remember and type, but descriptive
+ enough to differentiate it from alternatives. This policy has
+ not always been followed in the past, so don't follow that lead.
+
+ Try to:
+
+ - Use full names instead of abbreviations. Some abbreviations
+ however are common and acceptable, such as "diff", "avg", or
+ "abs".
+
+ - Use a name that makes sense independent of the application
+ that you may be copying it from.
+
+ - Use nouns instead of verbs (thus, "difference" instead of
+ "subtract", or "sum" instead of "add").
+
+ Class names are made up of a base part that describes what the
+ function does, appended with modifiers. Common modifiers are
+ for the type ("_f64", "_u8"), or to indicate inaccuracies or
+ limitations in implementations ("_i10", "_l10").
+
+ Use of underscores in the base part of the class name is arbitrary.
+ This may change in the future.
+
+ New classes should not use the modifier "_ns", since non-strided
+ arrays are the default.
+
+ Parameters should generally follow the order:
+
+ i1, is1, i2, is2, ..., d1, ds1, ..., s1, ss1, ..., n, m
+
+ After you add a new class, it's necessary to run 'make update' in
+ the liboil/ directory to regenerate some built headers.
+
+
+
diff --git a/configure.ac b/configure.ac
index 5f9c6fe..826cbbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,7 +191,7 @@ AC_SUBST(SSE2_CFLAGS)
AC_SUBST(SSE3_CFLAGS)
AC_SUBST(_3DNOW_CFLAGS)
-LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -I\$(top_srcdir) -O2"
+LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) -O2"
AC_SUBST(LIBOIL_CFLAGS)
LIBOIL_LIBS="\$(top_builddir)/liboil/liboil-$LIBOIL_MAJORMINOR.la"
@@ -212,10 +212,12 @@ liboil/conv/Makefile
liboil/copy/Makefile
liboil/dct/Makefile
liboil/fb/Makefile
+liboil/i386/Makefile
+liboil/jpeg/Makefile
liboil/math/Makefile
liboil/md5/Makefile
liboil/motovec/Makefile
-liboil/jpeg/Makefile
+liboil/ref/Makefile
liboil/simdpack/Makefile
liboil/sse/Makefile
liboil/utf8/Makefile
@@ -228,6 +230,7 @@ examples/md5/Makefile
examples/taylor/Makefile
examples/uberopt/Makefile
examples/work/Makefile
+liboil-uninstalled.pc
liboil.pc
])
AC_OUTPUT
diff --git a/liboil/Makefile.am b/liboil/Makefile.am
index e13e153..b9bf45a 100644
--- a/liboil/Makefile.am
+++ b/liboil/Makefile.am
@@ -1,17 +1,19 @@
pkgincludedir = $(includedir)/liboil-@LIBOIL_MAJORMINOR@/liboil
-SUBDIRS = colorspace conv copy dct fb jpeg math md5 motovec simdpack sse utf8
+SUBDIRS = colorspace conv copy dct fb i386 jpeg math md5 motovec ref simdpack sse utf8
lib_LTLIBRARIES = liboiltmp1.la liboil-@LIBOIL_MAJORMINOR@.la
noinst_LTLIBRARIES = liboilfunctions.la
-noinst_PROGRAMS = build_prototypes build_prototypes_doc build_marshal
+noinst_PROGRAMS = build_prototypes build_prototypes_doc build_marshal \
+ build_class_decls
pkginclude_HEADERS = liboil.h liboilfunction.h liboildebug.h liboilfuncs.h \
liboiltypes.h liboilcpu.h liboilprototype.h liboilparameter.h \
- liboilrandom.h liboilgcc.h liboiltest.h liboilprofile.h
+ liboilrandom.h liboilgcc.h liboiltest.h liboilprofile.h \
+ liboilinternal.h liboilclasses.h
nodist_noinst_HEADERS = liboilfuncs-doc.h
@@ -26,10 +28,12 @@ liboilfunctions_la_LIBADD = \
copy/libcopy.la \
dct/libdct.la \
fb/libfb.la \
+ i386/libi386.la \
jpeg/libjpeg.la \
math/libmath.la \
md5/libmd5.la \
motovec/libmotovec.la \
+ ref/libref.la \
simdpack/libsimdpack.la \
sse/libsse.la \
utf8/libutf8.la \
@@ -74,18 +78,21 @@ liboil_@LIBOIL_MAJORMINOR@_la_LDFLAGS = \
# This is required to use 'make -j2'. Automake doesn't seem to notice
# that one of the dependencies is in this directory.
build_prototypes_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la
-
build_prototypes_SOURCES = build_prototypes.c
build_prototypes_CFLAGS = $(LIBOIL_CFLAGS)
build_prototypes_LDADD = $(LIBOIL_LIBS)
+build_class_decls_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la
+build_class_decls_SOURCES = build_class_decls.c
+build_class_decls_CFLAGS = $(LIBOIL_CFLAGS)
+build_class_decls_LDADD = $(LIBOIL_LIBS)
+
build_prototypes_doc_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la
build_prototypes_doc_SOURCES = build_prototypes_doc.c
build_prototypes_doc_CFLAGS = $(LIBOIL_CFLAGS)
build_prototypes_doc_LDADD = $(LIBOIL_LIBS)
build_marshal_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la
-
build_marshal_SOURCES = build_marshal.c
build_marshal_CFLAGS = $(LIBOIL_CFLAGS)
build_marshal_LDADD = $(LIBOIL_LIBS)
@@ -128,4 +135,5 @@ update:
./build_prototypes >liboilfuncs.h
./build_marshal >liboilmarshal.c
./build_prototypes_doc >liboilfuncs-doc.h
+ ./build_class_decls >liboilclasses.h
diff --git a/liboil/build_class_decls.c b/liboil/build_class_decls.c
new file mode 100644
index 0000000..79383ba
--- /dev/null
+++ b/liboil/build_class_decls.c
@@ -0,0 +1,114 @@
+/*
+ * LIBOIL - Library of Optimized Inner Loops
+ * Copyright (c) 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.
+ */
+
+
+#include <stdio.h>
+#include <liboil/liboil.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <liboil/liboilprototype.h>
+
+void print_header (void);
+void print_footer (void);
+
+int main (int argc, char *argv[])
+{
+ OilFunctionClass *klass;
+ int i;
+ int n;
+
+ oil_init_no_optimize ();
+
+ print_header ();
+
+ n = oil_class_get_n_classes ();
+ for (i=0;i<n; i++ ){
+ klass = oil_class_get_by_index (i);
+
+ printf ("OIL_DECLARE_CLASS(%s);\n", klass->name);
+ }
+
+ print_footer ();
+
+ return 0;
+}
+
+void print_header (void)
+{
+ printf ("/*\n");
+ printf (" * LIBOIL - Library of Optimized Inner Loops\n");
+ printf (" * Copyright (c) 2005 David A. Schleef <ds@schleef.org>\n");
+ printf (" * All rights reserved.\n");
+ printf (" *\n");
+ printf (" * Redistribution and use in source and binary forms, with or without\n");
+ printf (" * modification, are permitted provided that the following conditions\n");
+ printf (" * are met:\n");
+ printf (" * 1. Redistributions of source code must retain the above copyright\n");
+ printf (" * notice, this list of conditions and the following disclaimer.\n");
+ printf (" * 2. Redistributions in binary form must reproduce the above copyright\n");
+ printf (" * notice, this list of conditions and the following disclaimer in the\n");
+ printf (" * documentation and/or other materials provided with the distribution.\n");
+ printf (" * \n");
+ printf (" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n");
+ printf (" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n");
+ printf (" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n");
+ printf (" * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n");
+ printf (" * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n");
+ printf (" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n");
+ printf (" * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n");
+ printf (" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n");
+ printf (" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n");
+ printf (" * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n");
+ printf (" * POSSIBILITY OF SUCH DAMAGE.\n");
+ printf (" */\n");
+ printf ("\n");
+ printf ("/* This file is automatically generated. Do not edit. */\n");
+ printf ("\n");
+ printf ("#ifndef _LIBOIL_CLASSES_H_\n");
+ printf ("#define _LIBOIL_CLASSES_H_\n");
+ printf ("\n");
+ printf ("#include <liboil/liboilfunction.h>\n");
+ printf ("\n");
+ printf ("#ifdef __cplusplus\n");
+ printf ("extern \"C\" {\n");
+ printf ("#endif\n");
+ printf ("\n");
+}
+
+void print_footer (void)
+{
+ printf ("\n");
+ printf ("#ifdef __cplusplus\n");
+ printf ("}\n");
+ printf ("#endif\n");
+ printf ("\n");
+ printf ("#endif\n");
+ printf ("\n");
+}
+
diff --git a/liboil/fb/.cvsignore b/liboil/fb/.cvsignore
new file mode 100644
index 0000000..2387231
--- /dev/null
+++ b/liboil/fb/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+.cvsignore
diff --git a/liboil/i386/.cvsignore b/liboil/i386/.cvsignore
new file mode 100644
index 0000000..2387231
--- /dev/null
+++ b/liboil/i386/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+.cvsignore
diff --git a/liboil/liboilclasses.h b/liboil/liboilclasses.h
new file mode 100644
index 0000000..a8f07cc
--- /dev/null
+++ b/liboil/liboilclasses.h
@@ -0,0 +1,304 @@
+/*
+ * LIBOIL - Library of Optimized Inner Loops
+ * Copyright (c) 2005 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.
+ */
+
+/* This file is automatically generated. Do not edit. */
+
+#ifndef _LIBOIL_CLASSES_H_
+#define _LIBOIL_CLASSES_H_
+
+#include <liboil/liboilfunction.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+OIL_DECLARE_CLASS(abs_f32_f32);
+OIL_DECLARE_CLASS(abs_f64_f64);
+OIL_DECLARE_CLASS(abs_u16_s16);
+OIL_DECLARE_CLASS(abs_u32_s32);
+OIL_DECLARE_CLASS(abs_u8_s8);
+OIL_DECLARE_CLASS(add_f32);
+OIL_DECLARE_CLASS(argb_paint_u8);
+OIL_DECLARE_CLASS(average2_u8);
+OIL_DECLARE_CLASS(ayuv2argb_u8);
+OIL_DECLARE_CLASS(ayuv2uyvy);
+OIL_DECLARE_CLASS(ayuv2yuyv);
+OIL_DECLARE_CLASS(ayuv2yvyu);
+OIL_DECLARE_CLASS(clip_f32);
+OIL_DECLARE_CLASS(clip_f64);
+OIL_DECLARE_CLASS(clip_s16);
+OIL_DECLARE_CLASS(clip_s32);
+OIL_DECLARE_CLASS(clip_s8);
+OIL_DECLARE_CLASS(clip_u16);
+OIL_DECLARE_CLASS(clip_u32);
+OIL_DECLARE_CLASS(clip_u8);
+OIL_DECLARE_CLASS(clipconv8x8_u8_s16);
+OIL_DECLARE_CLASS(clipconv_s16_f32);
+OIL_DECLARE_CLASS(clipconv_s16_f64);
+OIL_DECLARE_CLASS(clipconv_s16_s32);
+OIL_DECLARE_CLASS(clipconv_s16_u16);
+OIL_DECLARE_CLASS(clipconv_s16_u32);
+OIL_DECLARE_CLASS(clipconv_s32_f32);
+OIL_DECLARE_CLASS(clipconv_s32_f64);
+OIL_DECLARE_CLASS(clipconv_s32_u32);
+OIL_DECLARE_CLASS(clipconv_s8_f32);
+OIL_DECLARE_CLASS(clipconv_s8_f64);
+OIL_DECLARE_CLASS(clipconv_s8_s16);
+OIL_DECLARE_CLASS(clipconv_s8_s32);
+OIL_DECLARE_CLASS(clipconv_s8_u16);
+OIL_DECLARE_CLASS(clipconv_s8_u32);
+OIL_DECLARE_CLASS(clipconv_s8_u8);
+OIL_DECLARE_CLASS(clipconv_u16_f32);
+OIL_DECLARE_CLASS(clipconv_u16_f64);
+OIL_DECLARE_CLASS(clipconv_u16_s16);
+OIL_DECLARE_CLASS(clipconv_u16_s32);
+OIL_DECLARE_CLASS(clipconv_u16_u32);
+OIL_DECLARE_CLASS(clipconv_u32_f32);
+OIL_DECLARE_CLASS(clipconv_u32_f64);
+OIL_DECLARE_CLASS(clipconv_u32_s32);
+OIL_DECLARE_CLASS(clipconv_u8_f32);
+OIL_DECLARE_CLASS(clipconv_u8_f64);
+OIL_DECLARE_CLASS(clipconv_u8_s16);
+OIL_DECLARE_CLASS(clipconv_u8_s32);
+OIL_DECLARE_CLASS(clipconv_u8_s8);
+OIL_DECLARE_CLASS(clipconv_u8_u16);
+OIL_DECLARE_CLASS(clipconv_u8_u32);
+OIL_DECLARE_CLASS(colsad8x8_u8);
+OIL_DECLARE_CLASS(composite_add_argb);
+OIL_DECLARE_CLASS(composite_add_argb_const_src);
+OIL_DECLARE_CLASS(composite_add_u8);
+OIL_DECLARE_CLASS(composite_in_argb);
+OIL_DECLARE_CLASS(composite_in_argb_const_mask);
+OIL_DECLARE_CLASS(composite_in_argb_const_src);
+OIL_DECLARE_CLASS(composite_in_over_argb);
+OIL_DECLARE_CLASS(composite_in_over_argb_const_mask);
+OIL_DECLARE_CLASS(composite_in_over_argb_const_src);
+OIL_DECLARE_CLASS(composite_over_argb);
+OIL_DECLARE_CLASS(composite_over_argb_const_src);
+OIL_DECLARE_CLASS(composite_over_u8);
+OIL_DECLARE_CLASS(conv8x8_f64_s16);
+OIL_DECLARE_CLASS(conv8x8_s16_f64);
+OIL_DECLARE_CLASS(conv_f32_f64);
+OIL_DECLARE_CLASS(conv_f32_s16);
+OIL_DECLARE_CLASS(conv_f32_s32);
+OIL_DECLARE_CLASS(conv_f32_s8);
+OIL_DECLARE_CLASS(conv_f32_u16);
+OIL_DECLARE_CLASS(conv_f32_u32);
+OIL_DECLARE_CLASS(conv_f32_u8);
+OIL_DECLARE_CLASS(conv_f64_f32);
+OIL_DECLARE_CLASS(conv_f64_s16);
+OIL_DECLARE_CLASS(conv_f64_s32);
+OIL_DECLARE_CLASS(conv_f64_s8);
+OIL_DECLARE_CLASS(conv_f64_u16);
+OIL_DECLARE_CLASS(conv_f64_u32);
+OIL_DECLARE_CLASS(conv_f64_u8);
+OIL_DECLARE_CLASS(conv_s16_f32);
+OIL_DECLARE_CLASS(conv_s16_f64);
+OIL_DECLARE_CLASS(conv_s16_s32);
+OIL_DECLARE_CLASS(conv_s16_s8);
+OIL_DECLARE_CLASS(conv_s16_u16);
+OIL_DECLARE_CLASS(conv_s16_u32);
+OIL_DECLARE_CLASS(conv_s16_u8);
+OIL_DECLARE_CLASS(conv_s32_f32);
+OIL_DECLARE_CLASS(conv_s32_f64);
+OIL_DECLARE_CLASS(conv_s32_s16);
+OIL_DECLARE_CLASS(conv_s32_s8);
+OIL_DECLARE_CLASS(conv_s32_u16);
+OIL_DECLARE_CLASS(conv_s32_u32);
+OIL_DECLARE_CLASS(conv_s32_u8);
+OIL_DECLARE_CLASS(conv_s8_f32);
+OIL_DECLARE_CLASS(conv_s8_f64);
+OIL_DECLARE_CLASS(conv_s8_s16);
+OIL_DECLARE_CLASS(conv_s8_s32);
+OIL_DECLARE_CLASS(conv_s8_u16);
+OIL_DECLARE_CLASS(conv_s8_u32);
+OIL_DECLARE_CLASS(conv_s8_u8);
+OIL_DECLARE_CLASS(conv_u16_f32);
+OIL_DECLARE_CLASS(conv_u16_f64);
+OIL_DECLARE_CLASS(conv_u16_s16);
+OIL_DECLARE_CLASS(conv_u16_s32);
+OIL_DECLARE_CLASS(conv_u16_s8);
+OIL_DECLARE_CLASS(conv_u16_u32);
+OIL_DECLARE_CLASS(conv_u16_u8);
+OIL_DECLARE_CLASS(conv_u32_f32);
+OIL_DECLARE_CLASS(conv_u32_f64);
+OIL_DECLARE_CLASS(conv_u32_s16);
+OIL_DECLARE_CLASS(conv_u32_s32);
+OIL_DECLARE_CLASS(conv_u32_s8);
+OIL_DECLARE_CLASS(conv_u32_u16);
+OIL_DECLARE_CLASS(conv_u32_u8);
+OIL_DECLARE_CLASS(conv_u8_f32);
+OIL_DECLARE_CLASS(conv_u8_f64);
+OIL_DECLARE_CLASS(conv_u8_s16);
+OIL_DECLARE_CLASS(conv_u8_s32);
+OIL_DECLARE_CLASS(conv_u8_s8);
+OIL_DECLARE_CLASS(conv_u8_u16);
+OIL_DECLARE_CLASS(conv_u8_u32);
+OIL_DECLARE_CLASS(copy8x8_u8);
+OIL_DECLARE_CLASS(copy_u8);
+OIL_DECLARE_CLASS(dct36_f32);
+OIL_DECLARE_CLASS(dequantize8x8_s16);
+OIL_DECLARE_CLASS(diff8x8_average_s16_u8);
+OIL_DECLARE_CLASS(diff8x8_const128_s16_u8);
+OIL_DECLARE_CLASS(diff8x8_s16_u8);
+OIL_DECLARE_CLASS(diffsquaresum_f64);
+OIL_DECLARE_CLASS(divide_f32);
+OIL_DECLARE_CLASS(err_inter8x8_u8);
+OIL_DECLARE_CLASS(err_inter8x8_u8_avg);
+OIL_DECLARE_CLASS(err_intra8x8_u8);
+OIL_DECLARE_CLASS(fdct8_f64);
+OIL_DECLARE_CLASS(fdct8x8_f64);
+OIL_DECLARE_CLASS(fdct8x8s_s16);
+OIL_DECLARE_CLASS(fdct8x8theora);
+OIL_DECLARE_CLASS(floor_f32);
+OIL_DECLARE_CLASS(idct8_f64);
+OIL_DECLARE_CLASS(idct8theora_s16);
+OIL_DECLARE_CLASS(idct8x8_f64);
+OIL_DECLARE_CLASS(idct8x8_s16);
+OIL_DECLARE_CLASS(idct8x8lim10_f64);
+OIL_DECLARE_CLASS(idct8x8lim10_s16);
+OIL_DECLARE_CLASS(idct8x8theora_s16);
+OIL_DECLARE_CLASS(imdct12_f64);
+OIL_DECLARE_CLASS(imdct32_f32);
+OIL_DECLARE_CLASS(imdct36_f64);
+OIL_DECLARE_CLASS(inverse_f32);
+OIL_DECLARE_CLASS(maximum_f32);
+OIL_DECLARE_CLASS(md5);
+OIL_DECLARE_CLASS(mdct12_f64);
+OIL_DECLARE_CLASS(mdct36_f64);
+OIL_DECLARE_CLASS(merge_linear_argb);
+OIL_DECLARE_CLASS(minimum_f32);
+OIL_DECLARE_CLASS(mix_u8);
+OIL_DECLARE_CLASS(mult8x8_s16);
+OIL_DECLARE_CLASS(multiply_f32);
+OIL_DECLARE_CLASS(multsum_f32);
+OIL_DECLARE_CLASS(multsum_f64);
+OIL_DECLARE_CLASS(negative_f32);
+OIL_DECLARE_CLASS(null);
+OIL_DECLARE_CLASS(permute_f32);
+OIL_DECLARE_CLASS(permute_f64);
+OIL_DECLARE_CLASS(permute_s16);
+OIL_DECLARE_CLASS(permute_s32);
+OIL_DECLARE_CLASS(permute_s8);
+OIL_DECLARE_CLASS(permute_u16);
+OIL_DECLARE_CLASS(permute_u32);
+OIL_DECLARE_CLASS(permute_u8);
+OIL_DECLARE_CLASS(recon8x8_inter);
+OIL_DECLARE_CLASS(recon8x8_inter2);
+OIL_DECLARE_CLASS(recon8x8_intra);
+OIL_DECLARE_CLASS(resample_linear_argb);
+OIL_DECLARE_CLASS(resample_linear_u8);
+OIL_DECLARE_CLASS(rgb2bgr);
+OIL_DECLARE_CLASS(rgb2rgba);
+OIL_DECLARE_CLASS(rowsad8x8_u8);
+OIL_DECLARE_CLASS(sad8x8_f64);
+OIL_DECLARE_CLASS(sad8x8_f64_2);
+OIL_DECLARE_CLASS(sad8x8_s16);
+OIL_DECLARE_CLASS(sad8x8_s16_2);
+OIL_DECLARE_CLASS(sad8x8_u8);
+OIL_DECLARE_CLASS(sad8x8_u8_avg);
+OIL_DECLARE_CLASS(scalaradd_f32);
+OIL_DECLARE_CLASS(scalaradd_f32_ns);
+OIL_DECLARE_CLASS(scalaradd_f64);
+OIL_DECLARE_CLASS(scalaradd_s16);
+OIL_DECLARE_CLASS(scalaradd_s32);
+OIL_DECLARE_CLASS(scalaradd_s8);
+OIL_DECLARE_CLASS(scalaradd_u16);
+OIL_DECLARE_CLASS(scalaradd_u32);
+OIL_DECLARE_CLASS(scalaradd_u8);
+OIL_DECLARE_CLASS(scalarmult_f32);
+OIL_DECLARE_CLASS(scalarmult_f64);
+OIL_DECLARE_CLASS(scalarmult_s16);
+OIL_DECLARE_CLASS(scalarmult_s32);
+OIL_DECLARE_CLASS(scalarmult_s8);
+OIL_DECLARE_CLASS(scalarmult_u16);
+OIL_DECLARE_CLASS(scalarmult_u32);
+OIL_DECLARE_CLASS(scalarmult_u8);
+OIL_DECLARE_CLASS(scalarmultiply_f32_ns);
+OIL_DECLARE_CLASS(scaleconv_f32_s16);
+OIL_DECLARE_CLASS(scaleconv_f32_s32);
+OIL_DECLARE_CLASS(scaleconv_f32_s8);
+OIL_DECLARE_CLASS(scaleconv_f32_u16);
+OIL_DECLARE_CLASS(scaleconv_f32_u32);
+OIL_DECLARE_CLASS(scaleconv_f32_u8);
+OIL_DECLARE_CLASS(scaleconv_f64_s16);
+OIL_DECLARE_CLASS(scaleconv_f64_s32);
+OIL_DECLARE_CLASS(scaleconv_f64_s8);
+OIL_DECLARE_CLASS(scaleconv_f64_u16);
+OIL_DECLARE_CLASS(scaleconv_f64_u32);
+OIL_DECLARE_CLASS(scaleconv_f64_u8);
+OIL_DECLARE_CLASS(scaleconv_s16_f32);
+OIL_DECLARE_CLASS(scaleconv_s16_f64);
+OIL_DECLARE_CLASS(scaleconv_s32_f32);
+OIL_DECLARE_CLASS(scaleconv_s32_f64);
+OIL_DECLARE_CLASS(scaleconv_s8_f32);
+OIL_DECLARE_CLASS(scaleconv_s8_f64);
+OIL_DECLARE_CLASS(scaleconv_u16_f32);
+OIL_DECLARE_CLASS(scaleconv_u16_f64);
+OIL_DECLARE_CLASS(scaleconv_u32_f32);
+OIL_DECLARE_CLASS(scaleconv_u32_f64);
+OIL_DECLARE_CLASS(scaleconv_u8_f32);
+OIL_DECLARE_CLASS(scaleconv_u8_f64);
+OIL_DECLARE_CLASS(scanlinescale2_u8);
+OIL_DECLARE_CLASS(sign_f32);
+OIL_DECLARE_CLASS(sincos_f64);
+OIL_DECLARE_CLASS(splat_u32);
+OIL_DECLARE_CLASS(splat_u32_ns);
+OIL_DECLARE_CLASS(splat_u8);
+OIL_DECLARE_CLASS(splat_u8_ns);
+OIL_DECLARE_CLASS(squaresum_f64);
+OIL_DECLARE_CLASS(subtract_f32);
+OIL_DECLARE_CLASS(sum_f64);
+OIL_DECLARE_CLASS(tablelookup_u8);
+OIL_DECLARE_CLASS(trans8x8_f64);
+OIL_DECLARE_CLASS(trans8x8_u16);
+OIL_DECLARE_CLASS(trans8x8_u32);
+OIL_DECLARE_CLASS(trans8x8_u8);
+OIL_DECLARE_CLASS(unzigzag8x8_s16);
+OIL_DECLARE_CLASS(utf8_validate);
+OIL_DECLARE_CLASS(uyvy2ayuv);
+OIL_DECLARE_CLASS(vectoradd_f32);
+OIL_DECLARE_CLASS(vectoradd_f64);
+OIL_DECLARE_CLASS(vectoradd_s16);
+OIL_DECLARE_CLASS(vectoradd_s32);
+OIL_DECLARE_CLASS(vectoradd_s8);
+OIL_DECLARE_CLASS(vectoradd_u16);
+OIL_DECLARE_CLASS(vectoradd_u32);
+OIL_DECLARE_CLASS(vectoradd_u8);
+OIL_DECLARE_CLASS(yuv2rgbx_sub2_u8);
+OIL_DECLARE_CLASS(yuv2rgbx_sub4_u8);
+OIL_DECLARE_CLASS(yuv2rgbx_u8);
+OIL_DECLARE_CLASS(yuyv2ayuv);
+OIL_DECLARE_CLASS(yvyu2ayuv);
+OIL_DECLARE_CLASS(zigzag8x8_s16);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/liboil/liboilinternal.h b/liboil/liboilinternal.h
new file mode 100644
index 0000000..bb2fc27
--- /dev/null
+++ b/liboil/liboilinternal.h
@@ -0,0 +1,36 @@
+/*
+ * LIBOIL - 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 _LIBOIL_INTERNAL_H_
+#define _LIBOIL_INTERNAL_H_
+
+#include <liboil/liboil.h>
+#include <liboil/liboilfunction.h>
+#include <liboil/liboilclasses.h>
+
+#endif
+
diff --git a/liboil/math/.cvsignore b/liboil/math/.cvsignore
new file mode 100644
index 0000000..2387231
--- /dev/null
+++ b/liboil/math/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+.cvsignore
diff --git a/liboil/motovec/.cvsignore b/liboil/motovec/.cvsignore
new file mode 100644
index 0000000..2387231
--- /dev/null
+++ b/liboil/motovec/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+.cvsignore
diff --git a/liboil/ref/.cvsignore b/liboil/ref/.cvsignore
new file mode 100644
index 0000000..2387231
--- /dev/null
+++ b/liboil/ref/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+.cvsignore
diff --git a/liboil/sse/.cvsignore b/liboil/sse/.cvsignore
new file mode 100644
index 0000000..2387231
--- /dev/null
+++ b/liboil/sse/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+.cvsignore
diff --git a/liboil/utf8/.cvsignore b/liboil/utf8/.cvsignore
new file mode 100644
index 0000000..2387231
--- /dev/null
+++ b/liboil/utf8/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+.cvsignore
diff --git a/testsuite/instruction/check-instructions.pl b/testsuite/instruction/check-instructions.pl
index b8058e1..c256651 100755
--- a/testsuite/instruction/check-instructions.pl
+++ b/testsuite/instruction/check-instructions.pl
@@ -100,7 +100,10 @@ sub check
"faddl",
"faddp",
"fadds",
+ "fchs",
"fdivrl",
+ "fdivrs",
+ "fdivs",
"fild",
"fildl",
"fildll",
@@ -118,6 +121,7 @@ sub check
"fmuls",
"fnstcw",
"fnstsw",
+ "frndint",
"fsqrt",
"fstl",
"fstp",
@@ -130,6 +134,7 @@ sub check
"fsubr",
"fsubrl",
"fsubrp",
+ "fsubrs",
"fucom",
"fucomp",
"fucompp",
@@ -139,6 +144,7 @@ sub check
"incl",
"ja",
"jae",
+ "jb",
"jbe",
"je",
"jg",
@@ -162,6 +168,7 @@ sub check
"movzbl",
"movzbw",
"movzwl",
+ "mul",
"mulb",
"neg",
"nop",
@@ -177,6 +184,7 @@ sub check
"sar",
"sarl",
"shl",
+ "shll",
"shr",
"sub",
"subl",
@@ -205,6 +213,7 @@ sub check
#"pandn",
"pcmpeqb",
"pcmpeqd",
+ "pcmpeqw",
"pcmpgtb",
"pcmpgtd",
"pcmpgtw",
@@ -351,12 +360,14 @@ sub check
"packssdw",
"packsswb",
"packuswb",
+ "paddb",
"paddw",
"pand",
"pandn",
"pmaddwd",
"pmulhw",
"pmullw",
+ "pmulhuw",
"por",
"psrld",
"psrlq",