From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26386 invoked by alias); 25 Mar 2004 17:10:35 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26362 invoked from network); 25 Mar 2004 17:10:34 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 25 Mar 2004 17:10:34 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2PHAWWA005154 for ; Thu, 25 Mar 2004 12:10:32 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2PHAVM19977 for ; Thu, 25 Mar 2004 12:10:31 -0500 Received: from cygbert.vinschen.de (vpn50-14.rdu.redhat.com [172.16.50.14]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i2PHAUC15102 for ; Thu, 25 Mar 2004 09:10:30 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id DD7F85853D; Thu, 25 Mar 2004 18:10:24 +0100 (CET) Date: Thu, 25 Mar 2004 17:10:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: [RFA] sh-tdep.c: Fix double handling in LE mode Message-ID: <20040325171024.GZ17229@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-RedHat-Spam-Score: 0 X-SW-Source: 2004-03/txt/msg00624.txt.bz2 Hi, the below pretty trivial patch fixes two FAILs on SH4 and SH4a in little endian mode. Ok, to apply? Corinna * sh-tdep.c (sh3e_sh4_store_return_value): Correctly store double values in little endian mode. Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.167 diff -u -p -r1.167 sh-tdep.c --- sh-tdep.c 8 Mar 2004 10:18:13 -0000 1.167 +++ sh-tdep.c 25 Mar 2004 17:07:51 -0000 @@ -1147,7 +1147,11 @@ sh3e_sh4_store_return_value (struct type int len = TYPE_LENGTH (type); int i, regnum = FP0_REGNUM; for (i = 0; i < len; i += 4) - regcache_raw_write (regcache, regnum++, (char *) valbuf + i); + if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE) + regcache_raw_write (regcache, regnum++, + (char *) valbuf + len - 4 - i); + else + regcache_raw_write (regcache, regnum++, (char *) valbuf + i); } else sh_default_store_return_value (type, regcache, valbuf); -- Corinna Vinschen Cygwin Developer Red Hat, Inc.