From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1804 invoked by alias); 12 Jun 2002 13:12:39 -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 1793 invoked from network); 12 Jun 2002 13:12:36 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 12 Jun 2002 13:12:37 -0000 Received: by fw-cam.cambridge.arm.com; id OAA19454; Wed, 12 Jun 2002 14:12:35 +0100 (BST) Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma018820; Wed, 12 Jun 02 14:11:57 +0100 Received: from cam-mail2.cambridge.arm.com (cam-mail2.cambridge.arm.com [172.16.1.91]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id OAA19262; Wed, 12 Jun 2002 14:11:56 +0100 (BST) Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id OAA17242; Wed, 12 Jun 2002 14:11:56 +0100 (BST) Message-Id: <200206121311.OAA17242@cam-mail2.cambridge.arm.com> To: Andrew Cagney cc: gdb-patches@sources.redhat.com, Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: [rfc/rfa:arm] rewrite arm_push_arguments() as a single two pass loop In-reply-to: Your message of "Thu, 30 May 2002 11:07:19 EDT." <3CF64027.7080702@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 12 Jun 2002 06:12:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-06/txt/msg00187.txt.bz2 > > Hello, > > > > The code to push arguments onto the stack, for many ABI's, involves two passes: > > > > 1. iterate over the arguments. compute the location/offset of each, accumulate results (to compute the size of the stack frame). > > > > 2. iterate over the arguments, compute the location/offset of each, store accordingly > > > > The attached patch rewrites arm_push_arguments() so that the two passes are combined into a single two-pass for-loop. The only difference between the first and second pass of the loop is that the second pass stores values. The intent is to make the maintenance of the function easier - e.g. adding FP support would now involve one addition (currently it involves two). > > > > Thoughts, on the general approach? > > > > It also adds the command ``set debug arm'' which will cause the code to print out the arguments as they are pushed. > > > > Ok for arm? > > Andrew > > Hmm, with patch ... > Looks ok to me (at least, I can't spot any problems by inspection). R.