From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18830 invoked by alias); 6 Aug 2002 22:51:29 -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 18815 invoked from network); 6 Aug 2002 22:51:29 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 6 Aug 2002 22:51:29 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id PAA26317; Tue, 6 Aug 2002 15:49:38 -0700 (PDT) Message-ID: <3D504E8C.4C0FD7BE@redhat.com> Date: Tue, 06 Aug 2002 15:51:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Andrew Cagney CC: gdb-patches@sources.redhat.com Subject: Re: [RFA] mips-n32 reg_struct_has_addr References: <3D49EC2D.86CF5517@redhat.com> <3D504783.3060706@ges.redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00148.txt.bz2 Andrew Cagney wrote: > > > + static int > > + mips_newabi_reg_struct_has_addr (int gcc_p, struct type *type) > > + { > > + enum type_code typecode = TYPE_CODE (check_typedef (type)); > > + int len = TYPE_LENGTH (check_typedef (type)); > > + > > + if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION) > > + return (len > MIPS_SAVED_REGSIZE && len % MIPS_SAVED_REGSIZE != 0); > > + > > + return 0; > > + } > > No, I don't think this is right. As best I can tell, there is no cap on > the size of a struct that is passed by register. > > http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/srch3@o32/0650/bks/SGI_Developer/books/Mpro_n32_ABI/sgi_html/ch02.html#id80931 > > I.e., o32 and n32/n64 are the same -> never pass structures by reference. OK, patch withdrawn, I will resubmit it using this assumption, just to get the gdbarch-ification checked in, and then we can work on resolving how N32/64 should work. > > > *************** mips_push_arguments (int nargs, > > *** 2428,2448 **** > > "mips_push_arguments: %d len=%d type=%d", > > argnum + 1, len, (int) typecode); > > > > ! /* The EABI passes structures that do not fit in a register by > > Per other e-mail, rather than modify the existing mips_push_argument() > can you please created a dedicated mips_n32n64_push-arguments() function > and hack on that. That way, I don't have to worry about the other ABIs. > > > + /* Set up reg_struct_has_addr. */ > > + set_gdbarch_reg_struct_has_addr (gdbarch, > > BTW, the comment here is redundant. > > enjoy, > Andrew