[Liboil-commit] 2 commits - liboil/amd64 liboil/fb liboil/i386 liboil/i386_amd64
David Schleef
ds at kemper.freedesktop.org
Tue Apr 22 18:40:36 PDT 2008
liboil/amd64/wavelet.c | 4 ++--
liboil/fb/fbmmx.c | 4 ++--
liboil/i386/wavelet.c | 6 +++---
liboil/i386_amd64/multiply_and_acc.c | 10 +++++-----
4 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit 4d9d3c35cca4840b545819ace906b2f171a6d0d8
Author: David Schleef <ds at ginger.bigkitten.com>
Date: Tue Apr 22 18:38:56 2008 -0700
Fix some impls that read outside their arrays. Turns out to cause segfaults.
diff --git a/liboil/amd64/wavelet.c b/liboil/amd64/wavelet.c
index 1ee7ba7..6b1946a 100644
--- a/liboil/amd64/wavelet.c
+++ b/liboil/amd64/wavelet.c
@@ -1353,9 +1353,9 @@ multiply_and_add_s16_u8_mmx_2(int16_t *d1, int16_t *s1, int16_t *s2,
asm volatile ("\n"
" pxor %%mm7, %%mm7\n"
"1:\n"
- " movq 0(%3), %%mm0\n"
+ " movd 0(%3), %%mm0\n"
" punpcklbw %%mm7, %%mm0\n"
- " movq 4(%3), %%mm1\n"
+ " movd 4(%3), %%mm1\n"
" pmullw 0(%2), %%mm0\n"
" punpcklbw %%mm7, %%mm1\n"
" paddw 0(%1), %%mm0\n"
diff --git a/liboil/i386/wavelet.c b/liboil/i386/wavelet.c
index 16b779a..a382a22 100644
--- a/liboil/i386/wavelet.c
+++ b/liboil/i386/wavelet.c
@@ -1542,7 +1542,7 @@ multiply_and_add_s16_u8_mmx(int16_t *d1, int16_t *s1, int16_t *s2,
asm volatile ("\n"
" pxor %%mm7, %%mm7\n"
"1:\n"
- " movq 0(%3), %%mm0\n"
+ " movd 0(%3), %%mm0\n"
" punpcklbw %%mm7, %%mm0\n"
" pmullw 0(%2), %%mm0\n"
" paddw 0(%1), %%mm0\n"
@@ -1578,9 +1578,9 @@ multiply_and_add_s16_u8_mmx_2(int16_t *d1, int16_t *s1, int16_t *s2,
asm volatile ("\n"
" pxor %%mm7, %%mm7\n"
"1:\n"
- " movq 0(%3), %%mm0\n"
+ " movd 0(%3), %%mm0\n"
" punpcklbw %%mm7, %%mm0\n"
- " movq 4(%3), %%mm1\n"
+ " movd 4(%3), %%mm1\n"
" pmullw 0(%2), %%mm0\n"
" punpcklbw %%mm7, %%mm1\n"
" paddw 0(%1), %%mm0\n"
diff --git a/liboil/i386_amd64/multiply_and_acc.c b/liboil/i386_amd64/multiply_and_acc.c
index 5dd7950..8cb0e7b 100644
--- a/liboil/i386_amd64/multiply_and_acc.c
+++ b/liboil/i386_amd64/multiply_and_acc.c
@@ -6,7 +6,6 @@ void
multiply_and_acc_6xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1,
int ss1, uint8_t *s2, int ss2, int n)
{
- /* FIXME this reads outside the arrays. Bad. */
if (n==0) return;
__asm__ __volatile__ ("\n"
" pxor %%mm7, %%mm7\n"
@@ -16,10 +15,11 @@ multiply_and_acc_6xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1,
" pmullw 0(%1), %%mm0\n"
" paddw 0(%0), %%mm0\n"
" movq %%mm0, 0(%0)\n"
- " movd 4(%2), %%mm1\n"
+ " movd 2(%2), %%mm1\n"
" punpcklbw %%mm7, %%mm1\n"
- " pmullw 8(%1), %%mm1\n"
- " paddw 8(%0), %%mm1\n"
+ " pmullw 4(%1), %%mm1\n"
+ " paddw 4(%0), %%mm1\n"
+ " pshufw $0xee, %%mm1, %%mm1\n"
" movd %%mm1, 8(%0)\n"
" add %4, %0\n"
@@ -37,7 +37,7 @@ multiply_and_acc_6xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1,
);
}
OIL_DEFINE_IMPL_FULL (multiply_and_acc_6xn_s16_u8_mmx,
- multiply_and_acc_6xn_s16_u8, OIL_IMPL_FLAG_MMX);
+ multiply_and_acc_6xn_s16_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT);
void
multiply_and_acc_8xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1,
commit dfd5ef819fea81f5cca8010b034a80aa952809ed
Author: David Schleef <ds at ginger.bigkitten.com>
Date: Tue Apr 22 18:38:00 2008 -0700
Fix impl flags
diff --git a/liboil/fb/fbmmx.c b/liboil/fb/fbmmx.c
index d09cb8c..6da426f 100644
--- a/liboil/fb/fbmmx.c
+++ b/liboil/fb/fbmmx.c
@@ -331,7 +331,7 @@ mmxCombineAddU (uint32_t *dest, const uint32_t *src, int width)
}
_mm_empty();
}
-OIL_DEFINE_IMPL_FULL(mmxCombineAddU, composite_add_argb, OIL_IMPL_FLAG_MMX);
+OIL_DEFINE_IMPL_FULL(mmxCombineAddU, composite_add_argb, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_SSE);
#if 0
static FASTCALL void
@@ -1937,7 +1937,7 @@ fbCompositeSrcAdd_8888x8888mmx (uint32_t *dst, uint32_t *src, int w)
_mm_empty();
}
-OIL_DEFINE_IMPL_FULL (fbCompositeSrcAdd_8888x8888mmx, composite_add_argb, OIL_IMPL_FLAG_MMX);
+OIL_DEFINE_IMPL_FULL (fbCompositeSrcAdd_8888x8888mmx, composite_add_argb, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_SSE);
#if 0
#define GetStart(drw,x,y,type,stride,line,bpp) {\
More information about the Liboil-commit
mailing list