From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24527 invoked by alias); 12 Feb 2004 22:12:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24519 invoked from network); 12 Feb 2004 22:12:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 12 Feb 2004 22:12:46 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1CMCjb04574 for ; Thu, 12 Feb 2004 17:12:45 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1CMCiM10472 for ; Thu, 12 Feb 2004 17:12:45 -0500 Received: from 192.168.1.129 (vpn50-30.rdu.redhat.com [172.16.50.30]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i1CMCgX00317; Thu, 12 Feb 2004 14:12:43 -0800 From: Fred Fish Reply-To: fnf@redhat.com To: gdb-patches@sources.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 User-Agent: KMail/1.5.4 Cc: fnf@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402121512.40574.fnf@ninemoons.com> X-SW-Source: 2004-02/txt/msg00330.txt.bz2 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 * 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