From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4721 invoked by alias); 12 Nov 2002 10:15:22 -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 4714 invoked from network); 12 Nov 2002 10:15:20 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 12 Nov 2002 10:15:20 -0000 Received: by fw-cam.cambridge.arm.com; id KAA22121; Tue, 12 Nov 2002 10:15:19 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma021562; Tue, 12 Nov 02 10:14:57 GMT Received: from pc960.cambridge.arm.com (pc960.cambridge.arm.com [10.1.205.4]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA24998; Tue, 12 Nov 2002 10:14:56 GMT Received: from pc960.cambridge.arm.com (rearnsha@localhost) by pc960.cambridge.arm.com (8.11.6/8.9.3) with ESMTP id gACAEtF31639; Tue, 12 Nov 2002 10:14:55 GMT Message-Id: <200211121014.gACAEtF31639@pc960.cambridge.arm.com> X-Authentication-Warning: pc960.cambridge.arm.com: rearnsha owned process doing -bs To: Michael Snyder cc: Richard.Earnshaw@arm.com, gdb-patches@sources.redhat.com, cagney@redhat.com, kevinb@redhat.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. Subject: Re: [RFA] arm_store_return_value, big-endian (take 2) In-reply-to: Your message of "Mon, 11 Nov 2002 10:49:32 PST." <3DCFFBBC.715EB616@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Nov 2002 02:15:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-11/txt/msg00340.txt.bz2 > Richard Earnshaw wrote: > > > > > Richard Earnshaw wrote: > > > > > > > > > Richard Earnshaw wrote: > > > > > > > > > > > > Leaving asside the issue of the correctness of write_register_bytes (note > > > > > > to self, must finish of my register patches), I don't think this is > > > > > > correct -- in fact, I think it's also wrong for little-endian as well. > > > > > > > > > > > > What should happen is that the smaller-than-word value should be > > > > > > zero/sign-extended to 32 bits and then the whole thing stored in A1_REGNUM. > > > > > > > > > > Ah, thanks. OK, how about this? > > > > > > > > > > 2002-11-06 Michael Snyder > > > > > > > > > > * arm-tdep.c (arm_store_return_value): Handle offset of > > > > > small types on big-endian machines. > > > > > > > > And for little-endian? > > > > > > It already works for little-endian. I've tested this with > > > arm-sim, arm-sim/-mbig-endian, and arm-sim/-mthumb. > > > > But it's not zero/sign extending properly for little-endian, so garbage is > > remaining in the top part of A1 > > Ah; well, I didn't make it any worse! ;-) > Can I leave that detail for someone else, and just > submit this minor improvement? Given that to fix this for little-endian as well means that you just have to *remove* the endianness test from your patch, why is that so hard???!!!! Also, you should add a comment at this point explaining that we want to extend the value into the whole register. R.