This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c
- From: Fred Fish <fnf at ninemoons dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: fnf at redhat dot com
- Date: Thu, 12 Feb 2004 15:12:40 -0700
- Subject: [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c
- Reply-to: fnf at redhat dot com
In sh-tdep.c, cache->uses_fp is set to either 0 or 1, so there is no
point in testing to see if it is already 1 before setting it to 1.
-Fred
2004-02-12 Fred Fish <fnf@redhat.com>
* sh-tdep.c (sh_analyze_prologue): Eliminate useless test of
cache->uses_fp prior to setting it.
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.158
diff -c -r1.158 sh-tdep.c
*** sh-tdep.c 11 Feb 2004 15:40:28 -0000 1.158
--- sh-tdep.c 12 Feb 2004 22:07:29 -0000
***************
*** 501,508 ****
}
else if (IS_MOV_SP_FP (inst))
{
! if (!cache->uses_fp)
! cache->uses_fp = 1;
/* At this point, only allow argument register moves to other
registers or argument register moves to @(X,fp) which are
moving the register arguments onto the stack area allocated
--- 504,510 ----
}
else if (IS_MOV_SP_FP (inst))
{
! cache->uses_fp = 1;
/* At this point, only allow argument register moves to other
registers or argument register moves to @(X,fp) which are
moving the register arguments onto the stack area allocated