summaryrefslogtreecommitdiff
path: root/liboil
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2005-08-01 11:27:35 +0000
committerDavid Schleef <ds@schleef.org>2005-08-01 11:27:35 +0000
commit17f0aaff4d4d3447637b894962ee14686070e3d3 (patch)
tree9a655ef918227d2a261de2077b57063bc6b1c86f /liboil
parent1c83ad8012039ea382454b5bfd1cb91d128c93e4 (diff)
downloadliboil-17f0aaff4d4d3447637b894962ee14686070e3d3.tar.gz
* configure.ac: Changes to make amd64 not suck
* liboil/colorspace/Makefile.am: * liboil/conv/Makefile.am: * liboil/copy/Makefile.am: * liboil/dct/Makefile.am: * liboil/fb/Makefile.am: * liboil/liboilprofile.h: * liboil/md5/Makefile.am: * liboil/simdpack/Makefile.am: * liboil/simdpack/scalarmult.c: * liboil/sse/Makefile.am: * liboil/utf8/Makefile.am:
Diffstat (limited to 'liboil')
-rw-r--r--liboil/colorspace/Makefile.am12
-rw-r--r--liboil/conv/Makefile.am9
-rw-r--r--liboil/copy/Makefile.am12
-rw-r--r--liboil/dct/Makefile.am10
-rw-r--r--liboil/fb/Makefile.am5
-rw-r--r--liboil/liboilprofile.h9
-rw-r--r--liboil/md5/Makefile.am8
-rw-r--r--liboil/simdpack/Makefile.am11
-rw-r--r--liboil/simdpack/scalarmult.c24
-rw-r--r--liboil/sse/Makefile.am5
-rw-r--r--liboil/utf8/Makefile.am8
11 files changed, 82 insertions, 31 deletions
diff --git a/liboil/colorspace/Makefile.am b/liboil/colorspace/Makefile.am
index 2804da5..8745344 100644
--- a/liboil/colorspace/Makefile.am
+++ b/liboil/colorspace/Makefile.am
@@ -33,10 +33,20 @@ else
i386_sources =
endif
+if HAVE_CPU_AMD64
+amd64_sources = \
+ ayuv2argb_i386.c \
+ argb_paint_i386.c \
+ composite_i386.c
+else
+amd64_sources =
+endif
+
libcolorspace_la_SOURCES = \
$(c_sources) \
$(powerpc_sources) \
- $(i386_sources)
+ $(i386_sources) \
+ $(amd64_sources)
libcolorspace_la_LIBADD = $(opt_libs)
libcolorspace_la_CFLAGS = $(LIBOIL_CFLAGS)
diff --git a/liboil/conv/Makefile.am b/liboil/conv/Makefile.am
index eee4a93..c40c12f 100644
--- a/liboil/conv/Makefile.am
+++ b/liboil/conv/Makefile.am
@@ -24,6 +24,12 @@ else
i386_sources =
endif
+if HAVE_CPU_AMD64
+amd64_sources = conv_sse.c conv_3dnow.c
+else
+amd64_sources =
+endif
+
libconv_opt_la_SOURCES = $(c_sources)
libconv_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS)
@@ -32,7 +38,8 @@ noinst_HEADERS = conv.h
libconv_la_SOURCES = \
$(c_sources) \
$(powerpc_sources) \
- $(i386_sources)
+ $(i386_sources) \
+ $(amd64_sources)
libconv_la_CFLAGS = $(LIBOIL_CFLAGS)
libconv_la_LIBADD = $(opt_libs)
diff --git a/liboil/copy/Makefile.am b/liboil/copy/Makefile.am
index dc2aebf..73dd865 100644
--- a/liboil/copy/Makefile.am
+++ b/liboil/copy/Makefile.am
@@ -24,6 +24,15 @@ else
i386_sources =
endif
+if HAVE_CPU_AMD64
+amd64_sources = \
+ copy_i386.c \
+ splat_i386.c \
+ trans8x8_i386.c
+else
+amd64_sources =
+endif
+
c_sources = \
copy.c \
permute.c \
@@ -35,7 +44,8 @@ c_sources = \
libcopy_la_SOURCES = \
$(c_sources) \
$(powerpc_sources) \
- $(i386_sources)
+ $(i386_sources) \
+ $(amd64_sources)
libcopy_la_LIBADD = $(opt_libs)
libcopy_la_CFLAGS = $(LIBOIL_CFLAGS)
diff --git a/liboil/dct/Makefile.am b/liboil/dct/Makefile.am
index a407a45..9183724 100644
--- a/liboil/dct/Makefile.am
+++ b/liboil/dct/Makefile.am
@@ -17,6 +17,13 @@ else
i386_sources =
endif
+if HAVE_CPU_AMD64
+amd64_sources = \
+ idct8x8_i386.c
+else
+amd64_sources =
+endif
+
c_sources = \
dct12_f32.c \
dct36_f32.c \
@@ -30,7 +37,8 @@ c_sources = \
libdct_la_SOURCES = \
$(c_sources) \
- $(i386_sources)
+ $(i386_sources) \
+ $(amd64_sources)
libdct_la_CFLAGS = $(LIBOIL_CFLAGS)
libdct_la_LIBADD = $(opt_libs)
diff --git a/liboil/fb/Makefile.am b/liboil/fb/Makefile.am
index 0987982..d609417 100644
--- a/liboil/fb/Makefile.am
+++ b/liboil/fb/Makefile.am
@@ -12,9 +12,14 @@ if HAVE_CPU_I386
c_sources = \
fbmmx.c
else
+if HAVE_CPU_AMD64
+c_sources = \
+ fbmmx.c
+else
c_sources = \
empty.c
endif
+endif
libfb_la_SOURCES = $(c_sources)
libfb_la_CFLAGS = $(MMX_CFLAGS) $(SSE_CFLAGS) $(LIBOIL_CFLAGS)
diff --git a/liboil/liboilprofile.h b/liboil/liboilprofile.h
index 32f84f0..d09d3fc 100644
--- a/liboil/liboilprofile.h
+++ b/liboil/liboilprofile.h
@@ -55,6 +55,15 @@ static inline unsigned long oil_profile_stamp(void)
return ts;
}
+#elif defined(__amd64__)
+
+static inline unsigned long oil_profile_stamp(void)
+{
+ unsigned long ts;
+ __asm__ __volatile__("rdtsc\n" : "=a" (ts) : : "edx");
+ return ts;
+}
+
#elif defined(__powerpc__)
static inline unsigned long oil_profile_stamp(void)
diff --git a/liboil/md5/Makefile.am b/liboil/md5/Makefile.am
index 1c8cb21..39473b8 100644
--- a/liboil/md5/Makefile.am
+++ b/liboil/md5/Makefile.am
@@ -17,6 +17,12 @@ else
i386_sources =
endif
+if HAVE_CPU_AMD64
+amd64_sources = md5_i386.c
+else
+amd64_sources =
+endif
+
if HAVE_CPU_POWERPC
powerpc_sources = md5_powerpc.c
else
@@ -24,7 +30,7 @@ powerpc_sources =
endif
libmd5_la_SOURCES = \
- $(c_sources) $(i386_sources) $(powerpc_sources)
+ $(c_sources) $(i386_sources) $(powerpc_sources) $(amd64_sources)
libmd5_la_LIBADD = $(opt_libs)
libmd5_la_CFLAGS = $(LIBOIL_CFLAGS)
diff --git a/liboil/simdpack/Makefile.am b/liboil/simdpack/Makefile.am
index 573589a..e91c09f 100644
--- a/liboil/simdpack/Makefile.am
+++ b/liboil/simdpack/Makefile.am
@@ -35,6 +35,15 @@ else
i386_sources =
endif
+if HAVE_CPU_AMD64
+amd64_sources = \
+ abs_i386.c \
+ mult8x8_i386.c \
+ scalarmult_i386.c
+else
+amd64_sources =
+endif
+
if HAVE_CPU_POWERPC
powerpc_sources = \
abs_powerpc.c \
@@ -47,7 +56,7 @@ powerpc_sources =
endif
libsimdpack_la_SOURCES = \
- $(c_sources) $(i386_sources) $(powerpc_sources)
+ $(c_sources) $(i386_sources) $(powerpc_sources) $(amd64_sources)
libsimdpack_la_LIBADD = \
$(opt_libs)
libsimdpack_la_CFLAGS = $(LIBOIL_CFLAGS)
diff --git a/liboil/simdpack/scalarmult.c b/liboil/simdpack/scalarmult.c
index 446f5c1..1bd2772 100644
--- a/liboil/simdpack/scalarmult.c
+++ b/liboil/simdpack/scalarmult.c
@@ -179,27 +179,3 @@ SCALARMULT_DEFINE_UNROLL4 (f64);
-
-#define SCALARMULT_DEFINE_X(type) \
-static void scalarmult_ ## type ## _x( \
- type_ ## type *dest, int dstr, \
- type_ ## type *src, int sstr, \
- type_ ## type *val, int n) \
-{ \
- int i; \
- for(i=0;i<n;i+=2){ \
- dest[i] = src[i] * *val; \
- dest[i+1] = src[i+1] * *val; \
- } \
-} \
-OIL_DEFINE_IMPL (scalarmult_ ## type ## _x, scalarmult_ ## type);
-
-
-SCALARMULT_DEFINE_X (s8);
-SCALARMULT_DEFINE_X (u8);
-SCALARMULT_DEFINE_X (s16);
-SCALARMULT_DEFINE_X (u16);
-SCALARMULT_DEFINE_X (s32);
-SCALARMULT_DEFINE_X (u32);
-SCALARMULT_DEFINE_X (f32);
-SCALARMULT_DEFINE_X (f64);
diff --git a/liboil/sse/Makefile.am b/liboil/sse/Makefile.am
index 95ac1ab..b706a27 100644
--- a/liboil/sse/Makefile.am
+++ b/liboil/sse/Makefile.am
@@ -12,9 +12,14 @@ if HAVE_CPU_I386
c_sources = \
conv_sse.c
else
+if HAVE_CPU_AMD64
+c_sources = \
+ conv_sse.c
+else
c_sources = \
empty.c
endif
+endif
libsse_la_SOURCES = $(c_sources)
libsse_la_CFLAGS = $(SSE_CFLAGS) $(SSE2_CFLAGS) $(LIBOIL_CFLAGS)
diff --git a/liboil/utf8/Makefile.am b/liboil/utf8/Makefile.am
index 2c24921..eda880c 100644
--- a/liboil/utf8/Makefile.am
+++ b/liboil/utf8/Makefile.am
@@ -17,6 +17,12 @@ else
#i386_sources =
endif
+if HAVE_CPU_AMD64
+#amd64_sources = utf8_i386.c
+else
+#amd64_sources =
+endif
+
if HAVE_CPU_POWERPC
#powerpc_sources = utf8_powerpc.c
else
@@ -24,7 +30,7 @@ else
endif
libutf8_la_SOURCES = \
- $(c_sources) $(i386_sources) $(powerpc_sources)
+ $(c_sources) $(i386_sources) $(powerpc_sources) $(amd64_sources)
libutf8_la_LIBADD = $(opt_libs)
libutf8_la_CFLAGS = $(LIBOIL_CFLAGS)