Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c
@ 2004-02-12 22:12 Fred Fish
  2004-02-16 15:48 ` Elena Zannoni
  0 siblings, 1 reply; 3+ messages in thread
From: Fred Fish @ 2004-02-12 22:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnf

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-20  0:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-12 22:12 [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c Fred Fish
2004-02-16 15:48 ` Elena Zannoni
2004-02-20  0:17   ` Fred Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox