logo       

[PATCH] mips_push_arguments(): Save gdbarch_tdep result in local: msg#00626

Subject: [PATCH] mips_push_arguments(): Save gdbarch_tdep result in local
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))




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe