From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25860 invoked by alias); 10 Aug 2002 02:36:48 -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 25849 invoked from network); 10 Aug 2002 02:36:47 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 10 Aug 2002 02:36:47 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4BB413CF7; Fri, 9 Aug 2002 22:36:45 -0400 (EDT) Message-ID: <3D547C3D.2030401@ges.redhat.com> Date: Fri, 09 Aug 2002 19:36:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020802 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] mips_push_arguments gdbarch-ified References: <3D530861.CA3B3F01@redhat.com> <3D533C1C.1060102@ges.redhat.com> <3D54638C.1189FD8D@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00232.txt.bz2 > Andrew Cagney wrote: > >> > >> > These changes fix 16 testsuite failures, based in the Irix native >> > compiler running with -n32 (and produce no regressions for -o32). > >> >> Yes, with tweaks. >> >> General comment. You may want to consider restructuring the function to >> read: >> >> for (argument in arguments) >> for (argument broken down in to 8 byte chunks) >> if (fp argument && fnpreg <= num fp arg regs) >> write argument chunk to fp register >> else if (!fp argument && reg <= num arg regs) >> write chunk (carefully aligned) to gp register >> else >> write chunk to (carefully aligned) memory > > > OK, I've checked in, with all of your tweaks except for the above. > Come on, you can't ask me to restructure the whole function just > to get what was originally a 5-line change in!!! ;-) If you haven't already, look through the document: http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=bks&srch=&fname=/SGI_Developer/Mpro_n32_ABI/sgi_html/ch02.html which Kevin cited. The above was based on that. With the introduction of a new mips_n32n64_push_arguments() unction there is an oportunity to start with a clean slate. To be honest, I think taking that oportunity will make getting this working much easier! :-) > As it is, I've fixed a bunch of bugs that weren't mine, > just to get this in. Diffs that went in attached below. Oops, I didn't mean for you to touch the old mips_push_arguments() code. That can be left to rot. > 2002-08-09 Michael Snyder > > * mips-tdep.c (ROUND_DOWN, ROUND_UP): Move to global scope. > (mips_push_arguments): Correct some comments. Use paddr_nz > for printing addresses in debug output. Replace static > allocation using MAX_REGISTER_RAW_SIZE with alloca. > (mips_n32n64_push_arguments): New function, cloned from > mips_push_arguments and tuned for the n32/n64 ABI. > (mips_push_register): Buffer needs dynamic allocation. > (mips_print_register): Ditto. > (do_gp_register_row): Ditto. > (mips_store_return_value): Ditto. > (mips_gdbarch_init): Set gdbarch_push_arguments per ABI. ok, thanks Andrew