From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9198 invoked by alias); 17 Feb 2005 18:36:37 -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 8997 invoked from network); 17 Feb 2005 18:36:27 -0000 Received: from unknown (HELO oberon.lunarpages.com) (64.235.230.232) by sourceware.org with SMTP; 17 Feb 2005 18:36:27 -0000 Received: from cs2417422-200.houston.rr.com ([24.174.22.200] helo=clm5000e) by oberon.lunarpages.com with esmtpa (Exim 4.44) id 1D1qVp-0002BQ-BY; Thu, 17 Feb 2005 10:36:29 -0800 Reply-To: From: "Catherine Moore" To: "'Nick Clifton'" Cc: , "Catherine Moore" Subject: RE: [PATCH] Additional TC_EQUAL_IN_INSN check Date: Thu, 17 Feb 2005 21:34:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <42133AF4.2070602@redhat.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - oberon.lunarpages.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - cm00re.com X-Source: X-Source-Args: X-Source-Dir: X-SW-Source: 2005-02/txt/msg00407.txt.bz2 Message-ID: <20050217213400.WOQxJkTX8r-u0tlHkCuh5NY9zd8wOjrLD6Mrt3eVHE0@z> :-----Original Message----- :From: Nick Clifton [mailto:nickc@redhat.com] : :> This patch adds an argument to TC_EQUAL_IN_INSN so that the current string :> can be checked. : :Why is this needed ? Do you have a port where the current semantics for :TC_EQUAL_IN_INSN are insufficient ? [The string 's' can be deduced from : input_line_pointer, so why pass it as an extra argument ?] : :> It also adds an additional check for TC_EQUAL_IN_INSN in :> read_a_source_file. : :Again - why is is this necessary ? Couldn't the if-statement be :rearranged so that there was only one invocation of TC_EQUAL_IN_INSN ? : I don't think passing an extra argument is a big deal. If s is available, why not use it instead of deducing it?? It turns out that the only port (other than the one I'm working on) which uses this macro is the hppa and the hppa port doesn't look at the string. I've reworked the patch to pass s and not input_line_pointer to the TC_EQUAL_IN_INSN macro and also to use only one invocation of the macro as you suggested. Okay to install, now? Catherine * read.c (read_a_source_file): Check TC_EQUAL_IN_INSN if c is '='. * doc/internals.texi (TC_EQUAL_IN_INSN): Pass current string instead of input_line_pointer. Index: read.c =================================================================== RCS file: /cvs/src/src/gas/read.c,v retrieving revision 1.89 diff -p -r1.89 read.c *** read.c 17 Feb 2005 13:46:00 -0000 1.89 --- read.c 17 Feb 2005 18:23:14 -0000 *************** read_a_source_file (char *name) *** 708,720 **** /* Input_line_pointer->after ':'. */ SKIP_WHITESPACE (); } ! else if (c == '=' ! || ((c == ' ' || c == '\t') ! && input_line_pointer[1] == '=' #ifdef TC_EQUAL_IN_INSN ! && !TC_EQUAL_IN_INSN (c, input_line_pointer) #endif ! )) { equals (s, 1); demand_empty_rest_of_line (); --- 708,720 ---- /* Input_line_pointer->after ':'. */ SKIP_WHITESPACE (); } ! else if ((c == '=' ! || ((c == ' ' || c == '\t') ! && input_line_pointer[1] == '=')) #ifdef TC_EQUAL_IN_INSN ! && !TC_EQUAL_IN_INSN (c, s) #endif ! ) { equals (s, 1); demand_empty_rest_of_line (); Index: doc/internals.texi =================================================================== RCS file: /cvs/src/src/gas/doc/internals.texi,v retrieving revision 1.40 diff -p -r1.40 internals.texi *** doc/internals.texi 17 Aug 2004 12:19:58 -0000 1.40 --- doc/internals.texi 17 Feb 2005 18:23:15 -0000 *************** If you define this macro, GAS will not r *** 1029,1035 **** If you define this macro, it should return nonzero if the instruction is permitted to contain an @kbd{=} character. GAS will call it with two arguments, the character before the @kbd{=} character, and the value of ! @code{input_line_pointer} at that point. GAS uses this macro to decide if a @kbd{=} is an assignment or an instruction. @item TC_EOL_IN_INSN --- 1029,1035 ---- If you define this macro, it should return nonzero if the instruction is permitted to contain an @kbd{=} character. GAS will call it with two arguments, the character before the @kbd{=} character, and the value of ! @code{s} at that point. GAS uses this macro to decide if a @kbd{=} is an assignment or an instruction. @item TC_EOL_IN_INSN