From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4937 invoked by alias); 2 Jun 2003 13:43:20 -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 4925 invoked from network); 2 Jun 2003 13:43:20 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 2 Jun 2003 13:43:20 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h52DhJH18463 for ; Mon, 2 Jun 2003 09:43:19 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h52DhJI30554 for ; Mon, 2 Jun 2003 09:43:19 -0400 Received: from localhost.redhat.com (IDENT:o16Efnqtt8j/BgsTfN4Lo+yVlNx5svEa@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h52DhJb32721 for ; Mon, 2 Jun 2003 09:43:19 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 934842C43D; Mon, 2 Jun 2003 09:49:12 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16091.21976.440173.612371@localhost.redhat.com> Date: Mon, 02 Jun 2003 13:43:00 -0000 To: Richard Henderson Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] fix calling conventions wrt 32-bit values In-Reply-To: <20030602055343.GA7598@twiddle.net> References: <20030602055343.GA7598@twiddle.net> X-SW-Source: 2003-06/txt/msg00064.txt.bz2 Richard Henderson writes: > Ok? > > The alpha target has no official maintainer, and I think we can consider most of these patches obvious. I think that if they work for you, you can commit them yourself, and just post the patch with a [PATCH] subject. For patches to files other than the alpha ones, you still need an [RFA]. elena > r~ > > > * alpha-tdep.c (alpha_push_dummy_call): Handle ABI mandated > sign-extension of 32-bit values. > (alpha_store_return_value): Similarly. > > > --- alpha-tdep.c.5 2003-06-01 22:34:01.000000000 -0700 > +++ alpha-tdep.c 2003-06-01 22:42:32.000000000 -0700 > @@ -276,9 +276,16 @@ alpha_push_dummy_call (struct gdbarch *g > case TYPE_CODE_CHAR: > case TYPE_CODE_RANGE: > case TYPE_CODE_ENUM: > - if (TYPE_LENGTH (arg_type) < TYPE_LENGTH (builtin_type_long)) > + if (TYPE_LENGTH (arg_type) == 4) > { > - arg_type = builtin_type_long; > + /* 32-bit values must be sign-extended to 64 bits > + even if the base data type is unsigned. */ > + arg_type = builtin_type_int32; > + arg = value_cast (arg_type, arg); > + } > + if (TYPE_LENGTH (arg_type) < ALPHA_REGISTER_SIZE) > + { > + arg_type = builtin_type_int64; > arg = value_cast (arg_type, arg); > } > break; > @@ -541,6 +548,10 @@ alpha_store_return_value (struct type *v > > default: > /* Assume everything else degenerates to an integer. */ > + /* 32-bit values must be sign-extended to 64 bits > + even if the base data type is unsigned. */ > + if (length == 4) > + valtype = builtin_type_int32; > l = unpack_long (valtype, valbuf); > regcache_cooked_write_unsigned (regcache, ALPHA_V0_REGNUM, l); > break;