From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1359 invoked by alias); 15 Feb 2005 13:36:57 -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 1332 invoked from network); 15 Feb 2005 13:36:49 -0000 Received: from unknown (HELO oberon.lunarpages.com) (64.235.230.232) by sourceware.org with SMTP; 15 Feb 2005 13:36:49 -0000 Received: from cs2417422-200.houston.rr.com ([24.174.22.200] helo=clm5000e) by oberon.lunarpages.com with esmtpa (Exim 4.44) id 1D12sm-0002Jt-0e; Tue, 15 Feb 2005 05:36:52 -0800 Reply-To: From: "Catherine Moore" To: Cc: Subject: [PATCH] Additional TC_EQUAL_IN_INSN check Date: Tue, 15 Feb 2005 18:10:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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/msg00334.txt.bz2 Message-ID: <20050215181000.SGVITl10iJBFKv8L892XzPkJedzLRfeOPotL8ag_Sn4@z> This patch adds an argument to TC_EQUAL_IN_INSN so that the current string can be checked. It also adds an additional check for TC_EQUAL_IN_INSN in read_a_source_file. The gas tests passed on targets linux, hppa-elf and v850-elf. Okay to apply? Thanks, Catherine 2005-02-15 Catherine Moore * read.c (read_a_source_file): Pass s to TC_EQUAL_IN_INSN. Add additional check for TC_EQUAL_IN_INSN. * config/tc-hppa.h (TC_EQUAL_IN_INSN): Add argument. * doc/internals.texi (TC_EQUAL_IN_INSN): Document new argument. 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 15 Feb 2005 13:14:43 -0000 *************** If you define this macro, GAS will not r *** 1027,1036 **** @item TC_EQUAL_IN_INSN @cindex TC_EQUAL_IN_INSN 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 @cindex TC_EOL_IN_INSN --- 1027,1036 ---- @item TC_EQUAL_IN_INSN @cindex TC_EQUAL_IN_INSN If you define this macro, it should return nonzero if the instruction is ! permitted to contain an @kbd{=} character. GAS will call it with three ! arguments, the character before the @kbd{=} character, the current string ! @code{s}, 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 @cindex TC_EOL_IN_INSN Index: read.c =================================================================== RCS file: /cvs/src/src/gas/read.c,v retrieving revision 1.88 diff -p -r1.88 read.c *** read.c 31 Jan 2005 14:26:08 -0000 1.88 --- read.c 15 Feb 2005 13:14:46 -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,724 ---- /* 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, input_line_pointer) #endif )) + #ifdef TC_EQUAL_IN_INSN + && !TC_EQUAL_IN_INSN (c, s, input_line_pointer) + #endif + ) { equals (s, 1); demand_empty_rest_of_line (); Index: config/tc-hppa.h =================================================================== RCS file: /cvs/src/src/gas/config/tc-hppa.h,v retrieving revision 1.26 diff -p -r1.26 tc-hppa.h *** config/tc-hppa.h 27 Jul 2004 22:30:25 -0000 1.26 --- config/tc-hppa.h 15 Feb 2005 13:14:46 -0000 *************** extern const char hppa_symbol_chars[]; *** 123,129 **** completer in an instruction. This can be detected by checking the previous character, if the character is a comma, then the equal is being used as part of an instruction. */ ! #define TC_EQUAL_IN_INSN(C, PTR) ((C) == ',') /* Similarly for an exclamation point. It is used in FP comparison instructions and as an end of line marker. When used in an instruction --- 123,129 ---- completer in an instruction. This can be detected by checking the previous character, if the character is a comma, then the equal is being used as part of an instruction. */ ! #define TC_EQUAL_IN_INSN(C, NAME, PTR) ((C) == ',') /* Similarly for an exclamation point. It is used in FP comparison instructions and as an end of line marker. When used in an instruction