From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18403 invoked by alias); 9 Dec 2004 16:38:33 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 17932 invoked from network); 9 Dec 2004 16:38:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 9 Dec 2004 16:38:16 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iB9GcGcg002804; Thu, 9 Dec 2004 11:38:16 -0500 Received: from talisman.cambridge.redhat.com (talisman.cambridge.redhat.com [172.16.18.81]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iB9GcAr10750; Thu, 9 Dec 2004 11:38:10 -0500 Received: from talisman.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by talisman.cambridge.redhat.com (8.13.1/8.12.10) with ESMTP id iB9Gc96O016548; Thu, 9 Dec 2004 16:38:09 GMT Received: (from rsandifo@localhost) by talisman.cambridge.redhat.com (8.13.1/8.12.10/Submit) id iB9Gc8xa016546; Thu, 9 Dec 2004 16:38:08 GMT X-Authentication-Warning: talisman.cambridge.redhat.com: rsandifo set sender to rsandifo@redhat.com using -f To: Ian Lance Taylor Cc: binutils@sourceware.org Subject: Re: Increment size of relax sequence if we emit a nop References: <20041209155111.10502.qmail@gossamer.airs.com> From: Richard Sandiford Date: Thu, 09 Dec 2004 16:38:00 -0000 In-Reply-To: <20041209155111.10502.qmail@gossamer.airs.com> (Ian Lance Taylor's message of "9 Dec 2004 10:51:11 -0500") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-12/txt/msg00098.txt.bz2 Ian Lance Taylor writes: > Index: config/tc-mips.c > =================================================================== > RCS file: /cvs/src/src/gas/config/tc-mips.c,v > retrieving revision 1.275 > diff -u -r1.275 tc-mips.c > --- config/tc-mips.c 9 Dec 2004 06:17:14 -0000 1.275 > +++ config/tc-mips.c 9 Dec 2004 15:47:41 -0000 > @@ -2542,6 +2542,8 @@ > instruction at the destination, put it in the delay > slot, and bump the destination address. */ > emit_nop (); > + if (mips_relax.sequence) > + mips_relax.sizes[mips_relax.sequence - 1] += 4; > /* Update the previous insn information. */ > prev_prev_insn = *ip; > prev_insn.insn_mo = &dummy_opcode; Wouldn't it be better to turn emit_nop() into a function and do this check there instead? It's the kind of thing that might be needed in more than one place otherwise. Richard