From 78d51253e229bcb428039911d80a5d89d4bf4491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Mon, 1 Aug 2005 16:07:14 +0000 Subject: [PATCH] =?UTF-8?q?Fri=20Jul=2029=2017:20:53=202005=20S=C3=B8ren?= =?UTF-8?q?=20Sandmann=20=20Fix=20rounding=20bug.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fb/fbmmx.c | 5 +++-- 1 file 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();