From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31487 invoked by alias); 30 May 2002 03:10:22 -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 31462 invoked from network); 30 May 2002 03:10:19 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 30 May 2002 03:10:19 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id AB6393D48 for ; Wed, 29 May 2002 23:10:24 -0400 (EDT) Message-ID: <3CF59820.10009@cygnus.com> Date: Wed, 29 May 2002 20:32:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0rc2) Gecko/20020518 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [rfc/rfa:arm] rewrite arm_push_arguments() as a single two pass loop Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg01017.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