summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@daimi.au.dk>2005-08-01 16:07:14 +0000
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2005-08-01 16:07:14 +0000
commit78d51253e229bcb428039911d80a5d89d4bf4491 (patch)
tree9ec439d30a2820b098a4240d3c8db7baeec3e9a1
parentfd84b3b56280ef88a8c848c4338f0bea906ce6d8 (diff)
Fri Jul 29 17:20:53 2005 Søren Sandmann <sandmann@redhat.com>
Fix rounding bug.
-rw-r--r--fb/fbmmx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fb/fbmmx.c b/fb/fbmmx.c
index 849ea4364..21eb5f385 100644
--- a/fb/fbmmx.c
+++ b/fb/fbmmx.c
@@ -695,7 +695,8 @@ pix_multiply (__m64 a, __m64 b)
__m64 res;
res = _mm_mullo_pi16 (a, b);
- res = _mm_add_pi16 (res, MC(4x0080));
+ res = _mm_adds_pu16 (res, _mm_srli_pi16 (res, 8));
+ res = _mm_adds_pu16 (res, MC(4x0080));
res = _mm_srli_pi16 (res, 8);
return res;
@@ -2379,7 +2380,7 @@ fbHaveMMX (void)
{
static Bool initialized = FALSE;
static Bool mmx_present;
-
+
if (!initialized)
{
unsigned int features = detectCPUFeatures();