From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8973 invoked by alias); 19 Feb 2002 23:12:15 -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 8885 invoked from network); 19 Feb 2002 23:12:13 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 19 Feb 2002 23:12:13 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3131B3D12; Tue, 19 Feb 2002 18:12:13 -0500 (EST) Message-ID: <3C72DBCD.3000504@cygnus.com> Date: Tue, 19 Feb 2002 15:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Richard.Earnshaw@arm.com Cc: gdb-patches@sources.redhat.com Subject: Re: PATCH ARM initial support for different floating-point models References: <200202191923.TAA06815@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00510.txt.bz2 Hmm, I'm afraid you may have just stepped into the write_register_bytes() bear trap :-( Have a look at the comments in regcache.c for the history. > Index: arm-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/arm-tdep.c,v > retrieving revision 1.47 > diff -p -r1.47 arm-tdep.c > *** arm-tdep.c 2002/02/19 13:57:35 1.47 > --- arm-tdep.c 2002/02/19 19:14:40 > *************** arm_extract_return_value (struct type *t > *** 2139,2145 **** > char *valbuf) > { > if (TYPE_CODE_FLT == TYPE_CODE (type)) > ! convert_from_extended (®buf[REGISTER_BYTE (ARM_F0_REGNUM)], valbuf); > else > memcpy (valbuf, ®buf[REGISTER_BYTE (ARM_A1_REGNUM)], > TYPE_LENGTH (type)); Here, unfortunatly, directly pokeing around the regcache buffer (a parameter) is still the only way to do this. > TYPE_LENGTH (type)); > *************** arm_store_return_value (struct type *typ > *** 2256,2270 **** > { > if (TYPE_CODE (type) == TYPE_CODE_FLT) > { > char buf[MAX_REGISTER_RAW_SIZE]; > > ! convert_to_extended (valbuf, buf); > ! /* XXX Is this correct for soft-float? */ > ! write_register_bytes (REGISTER_BYTE (ARM_F0_REGNUM), buf, > ! MAX_REGISTER_RAW_SIZE); I think your changes to this function can be rewritten to use write_register_gen(REGNUM,BUF). Need to be careful though. If the code is assuming a floating point value should be stored across multiple adjacent registers then the code will need to be broken down into separate explicit writes. enjoy, Andrew