diff options
author | David Schleef <ds@ginger.bigkitten.com> | 2008-02-25 19:51:52 -0800 |
---|---|---|
committer | David Schleef <ds@ginger.bigkitten.com> | 2008-02-25 19:51:52 -0800 |
commit | c77faaaa2fc48586902878ba33bd01286654dcb6 (patch) | |
tree | 28b4d45716a64ea64401670b055f8e82b0258b76 | |
parent | dbd39644025946a11d659def5b8ae627af8c393b (diff) |
Add workaround for older versions of gas that don't have SSSE3 support
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | liboil/i386_amd64/mas.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5c9a0dd..352c49b 100644 --- a/configure.ac +++ b/configure.ac @@ -215,6 +215,12 @@ AC_SUBST(_3DNOW_CFLAGS) AC_SUBST(_3DNOWEXT_CFLAGS) AC_SUBST(ALTIVEC_CFLAGS) +dnl binutils-2.18 required for this, but is too new for FreeBSD/Solaris +AS_GCC_INLINE_ASM_INSTRUCTION([pmaddubsw %%mm0, %%mm0], [HAVE_SSSE3_ASM=yes], [HAVE_SSSE3_ASM=no]) +if test "x$HAVE_SSSE3_ASM" = xyes ; then + AC_DEFINE(HAVE_SSSE3_ASM, 1, [Defined if compiler/assembler can handle SSSE3 instructions]) +fi + AC_DEFINE(OIL_EXPORTS, 1, [Defined for compiling internal code]) LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) -DOIL_ENABLE_UNSTABLE_API" diff --git a/liboil/i386_amd64/mas.c b/liboil/i386_amd64/mas.c index 20d4d2f..8a30a78 100644 --- a/liboil/i386_amd64/mas.c +++ b/liboil/i386_amd64/mas.c @@ -735,6 +735,7 @@ mas8_u8_sym_mmx_5 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, } OIL_DEFINE_IMPL_FULL (mas8_u8_sym_mmx_5, mas8_u8_sym_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); +#ifdef HAVE_SSSE3_ASM void mas8_u8_sym_mmx_6 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) @@ -798,6 +799,7 @@ mas8_u8_sym_mmx_6 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_sym_mmx_6, mas8_u8_sym_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT|OIL_IMPL_FLAG_SSSE3); +#endif #ifdef ENABLE_BROKEN_IMPLS /* This only works for the taps array: -1, 3, -7, 21, 21, -7, 3, -1 */ |