Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fred Fish <fnf@ninemoons.com>
To: gdb-patches@sources.redhat.com
Cc: fnf@redhat.com
Subject: [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c
Date: Thu, 12 Feb 2004 22:12:00 -0000	[thread overview]
Message-ID: <200402121512.40574.fnf@ninemoons.com> (raw)

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




             reply	other threads:[~2004-02-12 22:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-12 22:12 Fred Fish [this message]
2004-02-16 15:48 ` Elena Zannoni
2004-02-20  0:17   ` Fred Fish

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=200402121512.40574.fnf@ninemoons.com \
    --to=fnf@ninemoons.com \
    --cc=fnf@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