From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10235 invoked by alias); 19 Sep 2006 18:36:50 -0000 Received: (qmail 10226 invoked by uid 22791); 19 Sep 2006 18:36:49 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Sep 2006 18:36:47 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id A179226AA3; Tue, 19 Sep 2006 11:36:45 -0700 (PDT) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31392-02-12; Tue, 19 Sep 2006 11:36:44 -0700 (PDT) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id 544E626A87; Tue, 19 Sep 2006 11:36:44 -0700 (PDT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: gdb (ARM processor) casting issues in iwmmxt.c Date: Tue, 19 Sep 2006 18:36:00 -0000 Message-ID: <0F4DF2E21F33DD46BE7B8CDEEB0E16D307EACD@ussunex01.palmsource.com> References: <8c7950360609190443n3e48263cg5a3638da76d6dc3b@mail.gmail.com><0F4DF2E21F33DD46BE7B8CDEEB0E16D307EACB@ussunex01.palmsource.com> <8c7950360609191133q251b8ff0g7188fbc70de820ba@mail.gmail.com> From: "Michael Snyder" To: Cc: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00111.txt.bz2 OK. We generally don't accept patches for old releases. Try going to at least 6.5. -----Original Message----- From: shanevolpe@gmail.com [mailto:shanevolpe@gmail.com] Sent: Tue 9/19/2006 11:33 AM To: Michael Snyder Cc: gdb@sourceware.org Subject: Re: gdb (ARM processor) casting issues in iwmmxt.c =20 Michael, I'm using 6.2 and 6.3, I will look at porting the cvs to the embedded platform I'm using (openembedded.org) Regards, Shane On 9/19/06, Michael Snyder wrote: > > Are you on a branch? The casts that you want to change > don't seem to be in my version of the source file (which > according to CVS, is up to date). > > Michael > > > -----Original Message----- > From: gdb-owner@sourceware.org on behalf of shanevolpe@gmail.com > Sent: Tue 9/19/2006 4:43 AM > To: gdb@sourceware.org > Subject: gdb (ARM processor) casting issues in iwmmxt.c > > All, > I tried compiling gdb client for the xscale processor and all works > good but for some casting issues in iwmmxt.c Here is what I found: > There is casting occurring on the target: > (unsigned long) s1 =3D a * b; > I changed all the castings to only cast on the source and not > target.. After my modifications everything compiled fine. Below is a > patch file with my changes. I'm not sure if there is something I'm > missing, I have never seen casting on the target before. > > Patch: > --- gdb-6.3/sim/arm/iwmmxt~old.c 2003-03-27 12:13:33.000000000 -0500 > +++ gdb-6.3/sim/arm/iwmmxt.c 2006-09-18 15:26:05.000000000 -0400 > @@ -2114,7 +2114,7 @@ > > s =3D (signed long) a * (signed long) b; > > - (signed long long) t +=3D s; > + t +=3D (signed long long)s; > } > else > { > @@ -2130,7 +2130,7 @@ > wR [BITS (12, 15)] =3D 0; > > if (BIT (21)) /* Signed. */ > - (signed long long) wR[BITS (12, 15)] +=3D (signed long long) t; > + wR[BITS (12, 15)] +=3D (signed long long) t; > else > wR [BITS (12, 15)] +=3D t; > > @@ -2166,7 +2166,7 @@ > b =3D wRHALF (BITS (0, 3), i * 2); > b =3D EXTEND16 (b); > > - (signed long) s1 =3D a * b; > + s1 =3D (signed long)a * (signed long)b; > > a =3D wRHALF (BITS (16, 19), i * 2 + 1); > a =3D EXTEND16 (a); > @@ -2174,7 +2174,7 @@ > b =3D wRHALF (BITS (0, 3), i * 2 + 1); > b =3D EXTEND16 (b); > > - (signed long) s2 =3D a * b; > + s2 =3D (signed long)a * (signed long)b; > } > else /* Unsigned. */ > { > @@ -2183,12 +2183,12 @@ > a =3D wRHALF (BITS (16, 19), i * 2); > b =3D wRHALF (BITS ( 0, 3), i * 2); > > - (unsigned long) s1 =3D a * b; > + s1 =3D (unsigned long)a *(unsigned long) b; > > a =3D wRHALF (BITS (16, 19), i * 2 + 1); > b =3D wRHALF (BITS ( 0, 3), i * 2 + 1); > > - (signed long) s2 =3D a * b; > + s2 =3D (signed long)a * (signed long)b; > } > > r |=3D (ARMdword) ((s1 + s2) & 0xffffffff) << (i ? 32 : 0); > > > > > -- > Registered Linux User: #293401 > > --=20 Registered Linux User: #293401