From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7069 invoked by alias); 19 Dec 2001 18:19:21 -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 6021 invoked from network); 19 Dec 2001 18:18:02 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 19 Dec 2001 18:18:02 -0000 Received: from porcupine.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id KAA26976 for ; Wed, 19 Dec 2001 10:17:32 -0800 (PST) Received: from porcupine.cygnus.com (law@localhost) by porcupine.cygnus.com (8.11.6/8.11.6) with ESMTP id fBJIGwW21843 for ; Wed, 19 Dec 2001 11:16:59 -0700 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 To: gdb-patches@sources.redhat.com Reply-to: law@redhat.com From: law@redhat.com Subject: PA fixes for return2.exp Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 19 Dec 2001 10:19:00 -0000 Message-ID: <21842.1008785818@porcupine.cygnus.com> X-SW-Source: 2001-12/txt/msg00470.txt.bz2 This patch fixes the assorted failures in return2.exp. In a nutshell, for sub-word return types, we stored the return value into the wrong location in the register array. This patch makes STORE_RETURN_VALUE act like EXTRACT_RETURN_VALUE and fixes the return2.exp failures. * tm-hppa.h (STORE_RETURN_VALUE): Update to deal with sub-word return types. Index: tm-hppa.h =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/config/pa/tm-hppa.h,v retrieving revision 1.86 diff -c -3 -p -r1.86 tm-hppa.h *** tm-hppa.h 2001/06/14 21:03:22 1.86 --- tm-hppa.h 2001/12/19 18:13:19 *************** extern use_struct_convention_fn hppa_use *** 361,371 **** then we put it in the float registers too. */ #define STORE_RETURN_VALUE(TYPE,VALBUF) \ ! write_register_bytes (REGISTER_BYTE (28),(VALBUF), TYPE_LENGTH (TYPE)) ; \ ! if (!SOFT_FLOAT) \ ! write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_FLT \ ! ? REGISTER_BYTE (FP4_REGNUM) \ ! : REGISTER_BYTE (28)), \ (VALBUF), TYPE_LENGTH (TYPE)) /* Extract from an array REGBUF containing the (raw) register state --- 361,373 ---- then we put it in the float registers too. */ #define STORE_RETURN_VALUE(TYPE,VALBUF) \ ! write_register_bytes (REGISTER_BYTE (28) + \ ! (TYPE_LENGTH (TYPE) > 4 \ ! ? (8 - TYPE_LENGTH (TYPE)) \ ! : (4 - TYPE_LENGTH (TYPE))), \ ! (VALBUF), TYPE_LENGTH (TYPE)); \ ! if (!SOFT_FLOAT && TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ ! write_register_bytes (REGISTER_BYTE (FP4_REGNUM), \ (VALBUF), TYPE_LENGTH (TYPE)) /* Extract from an array REGBUF containing the (raw) register state