Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933688AbZGQAJ3 (ORCPT ); Thu, 16 Jul 2009 20:09:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933687AbZGQAFy (ORCPT ); Thu, 16 Jul 2009 20:05:54 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:39119 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933681AbZGQAFw (ORCPT ); Thu, 16 Jul 2009 20:05:52 -0400 From: Mike Frysinger To: linux-kernel@vger.kernel.org Cc: uclinux-dist-devel@blackfin.uclinux.org, Jie Zhang Subject: [PATCH 07/21] Blackfin: fix miscompilation in lshrdi3 Date: Thu, 16 Jul 2009 20:05:32 -0400 Message-Id: <1247789146-18786-8-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1247789146-18786-1-git-send-email-vapier@gentoo.org> References: <1247789146-18786-1-git-send-email-vapier@gentoo.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1622 Lines: 50 From: Jie Zhang The code used in the Blackfin lshrdi3 utilizes gcc constructs. However, the structures declared don't line up with the code gcc generates, so under certain optimizations, we get bad code and things crap out in fun random ways. So rather than trying to maintain different gcc definitions ourselves, just use the ones available in gcclib.h. URL: http://blackfin.uclinux.org/gf/tracker/5286 Signed-off-by: Jie Zhang Signed-off-by: Mike Frysinger --- arch/blackfin/lib/lshrdi3.c | 16 +--------------- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/arch/blackfin/lib/lshrdi3.c b/arch/blackfin/lib/lshrdi3.c index 84b9c55..e57bf6f 100644 --- a/arch/blackfin/lib/lshrdi3.c +++ b/arch/blackfin/lib/lshrdi3.c @@ -27,21 +27,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#define BITS_PER_UNIT 8 - -typedef int SItype __attribute__ ((mode(SI))); -typedef unsigned int USItype __attribute__ ((mode(SI))); -typedef int DItype __attribute__ ((mode(DI))); -typedef int word_type __attribute__ ((mode(__word__))); - -struct DIstruct { - SItype high, low; -}; - -typedef union { - struct DIstruct s; - DItype ll; -} DIunion; +#include "gcclib.h" #ifdef CONFIG_ARITHMETIC_OPS_L1 DItype __lshrdi3(DItype u, word_type b)__attribute__((l1_text)); -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/