From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21206 invoked by alias); 7 Dec 2010 11:05:09 -0000 Received: (qmail 21197 invoked by uid 22791); 7 Dec 2010 11:05:07 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Dec 2010 11:05:02 +0000 Received: by wyj26 with SMTP id 26so6049927wyj.0 for ; Tue, 07 Dec 2010 03:05:00 -0800 (PST) Received: by 10.227.129.7 with SMTP id m7mr7098669wbs.27.1291719900143; Tue, 07 Dec 2010 03:05:00 -0800 (PST) Received: from localhost (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id h29sm4160851wbc.21.2010.12.07.03.04.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Dec 2010 03:04:59 -0800 (PST) From: Richard Sandiford To: "Maciej W. Rozycki" Mail-Followup-To: "Maciej W. Rozycki" ,Catherine Moore , binutils@sourceware.org, rdsandiford@googlemail.com Cc: Catherine Moore , binutils@sourceware.org Subject: Re: [PATCH 13/20] MIPS/GAS: Improve instruction's mnemonic processing References: Date: Tue, 07 Dec 2010 11:05:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Thu, 2 Dec 2010 19:21:17 +0000 (GMT)") Message-ID: <87oc8xalnq.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-12/txt/msg00264.txt.bz2 Patches 11 and 12 OK. >> You could use alloca to create an opcode without the "16" or "32", >> which would make the error-reporting code simpler. It's best not >> to change the user's source line if we can help it. > > I have made a complementing adjustment to original code currently present > in mips_ip(), making the whole piece much simpler and less fragile. > > 2010-12-02 Maciej W. Rozycki > > gas/ > * config/tc-mips.c (mips_ip): Make a copy of the instruction's > mnemonic and use it for further processing. This patch doesn't preserve the current behaviour. The current code treats the text after the "." as the first thing that should be matched against the format string. I assume it dates back to a time when certain types of operand suffix were handled using format characters. (Maybe the floating-point condition codes and formats?) This meant that things like: addu.$4,$5,$6 were also acceptable, although of course: c.eq.d.$f0,$f2 wasn't. The patch instead ignores everything after the ".", which means that we'd accept stuff like: addu.foobar $4,$5,$7 (although again not "c.eq.d.foobar"). I think we can simply remove the dot check. I don't see any testsuite regressions after doing that. Richard