Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] mips_push_arguments(): Save gdbarch_tdep result in local
Date: Wed, 31 Jul 2002 13:23:00 -0000	[thread overview]
Message-ID: <1020731201649.ZM22984@localhost.localdomain> (raw)

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))


                 reply	other threads:[~2002-07-31 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020731201649.ZM22984@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox