From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27186 invoked by alias); 31 Jul 2002 20:16:57 -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 27063 invoked from network); 31 Jul 2002 20:16:54 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 31 Jul 2002 20:16:54 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g6VK4Ul09303 for ; Wed, 31 Jul 2002 16:04:30 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g6VKGqu01776 for ; Wed, 31 Jul 2002 16:16:52 -0400 Received: from romulus.sfbay.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g6VKGpm01025 for ; Wed, 31 Jul 2002 13:16:51 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g6VKGn622985 for gdb-patches@sources.redhat.com; Wed, 31 Jul 2002 13:16:49 -0700 Date: Wed, 31 Jul 2002 13:23:00 -0000 From: Kevin Buettner Message-Id: <1020731201649.ZM22984@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: [PATCH] mips_push_arguments(): Save gdbarch_tdep result in local MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-07/txt/msg00628.txt.bz2 I've just committed the change below. This is an obvious and (at the moment) useless change. I will be submitting some other changes to mips_push_arguments() shortly which reference ``tdep''. This change will prevent mips_push_arguments() from repeatedly fetching the tdep information during the course a (single) call to mips_push_arguments(). I'm just trying to get the obvious stuff out of the way before submitting the parts which need review... * mips-tdep.c (mips_push_arguments): Fetch gdbarch_tdep struct and save it in a local variable. Use variable in later test. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.83 diff -u -p -r1.83 mips-tdep.c --- mips-tdep.c 31 Jul 2002 19:08:46 -0000 1.83 +++ mips-tdep.c 31 Jul 2002 20:01:13 -0000 @@ -2339,6 +2339,7 @@ mips_push_arguments (int nargs, int argnum; int len = 0; int stack_offset = 0; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); /* Macros to round N up or down to the next A boundary; A must be a power of two. */ @@ -2515,7 +2516,7 @@ mips_push_arguments (int nargs, (len % MIPS_SAVED_REGSIZE != 0)); /* Structures should be aligned to eight bytes (even arg registers) on MIPS_ABI_O32 if their first member has double precision. */ - if (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_O32 + if (tdep->mips_abi == MIPS_ABI_O32 && mips_type_needs_double_align (arg_type)) { if ((argreg & 1))