* [PATCH] mips_push_arguments(): Save gdbarch_tdep result in local
@ 2002-07-31 13:23 Kevin Buettner
0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2002-07-31 13:23 UTC (permalink / raw)
To: gdb-patches
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))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-31 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31 13:23 [PATCH] mips_push_arguments(): Save gdbarch_tdep result in local Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox