From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24484 invoked by alias); 1 Nov 2010 21:28:22 -0000 Received: (qmail 24476 invoked by uid 22791); 1 Nov 2010 21:28:21 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Nov 2010 21:28:16 +0000 Received: by wwi18 with SMTP id 18so347591wwi.12 for ; Mon, 01 Nov 2010 14:28:13 -0700 (PDT) Received: by 10.227.155.83 with SMTP id r19mr13963530wbw.166.1288646893709; Mon, 01 Nov 2010 14:28:13 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id a17sm5612749wbe.0.2010.11.01.14.28.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Nov 2010 14:28:11 -0700 (PDT) From: Richard Sandiford To: "Maciej W. Rozycki" Mail-Followup-To: "Maciej W. Rozycki" ,binutils@sourceware.org, rdsandiford@googlemail.com Cc: binutils@sourceware.org Subject: Re: [PATCH 1/5] MIPS/GAS: Fix o32 LD to the base register References: Date: Mon, 01 Nov 2010 21:28:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Sun, 31 Oct 2010 22:46:40 +0000 (GMT)") Message-ID: <87vd4gd995.fsf@firetop.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00017.txt.bz2 "Maciej W. Rozycki" writes: > binutils-2.20.51-20100925-mips-gas-ld-o-base.patch > Index: binutils-2.20.51/gas/config/tc-mips.c > =================================================================== > --- binutils-2.20.51.orig/gas/config/tc-mips.c > +++ binutils-2.20.51/gas/config/tc-mips.c > @@ -7346,17 +7346,29 @@ macro (struct mips_cl_insn *ip) > > case M_LD_OB: > s = HAVE_64BIT_GPRS ? "ld" : "lw"; > + off = 1; > + /* If the first load would overwrite the base register, > + then swap the accesses. */ > + if (!HAVE_64BIT_GPRS && treg == breg && breg != ZERO) > + { > + offset_expr.X_add_number += 4; > + treg += 1; > + off = -1; > + } > goto sd_ob; > + > case M_SD_OB: > s = HAVE_64BIT_GPRS ? "sd" : "sw"; > + off = 1; > + Add a fallthrough comment if you're adding whitespace. Patches 1-3 are otherwise OK. I'm not convinced 4 is worthwhile given that these macros are really in maintenance mode. I still don't like the way that you're matching ECOFF and ELF offsets in a single test, allowing two load offsets when (for each format individually) only one offset is actually acceptable. But patch 5 is OK nonetheless. Richard