This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Check for valid label
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Mon, 21 Apr 2003 20:35:55 -0700
- Subject: PATCH: Check for valid label
On ia64, we can have
(p7) hint @pause
But gas won't take it:
# as -o f.o f.s
f.s: Assembler messages:
f.s:1: Error: Unknown opcode `hint at pause'
The problem is gas first treats "(p7)" as a label and then thinks it is
an opcode since it doesn't have a ":'. Later "hint @pause" is taken as
an operand and the white space before '@' gets removed. This patch
checks if the first char is a valid label char before treating it as
the start of a label.
H.J.
--
2003-04-21 H.J. Lu <hjl at gnu dot org>
* app.c (do_scrub_chars): Check for valid label.
--- gas/app.c.pause 2003-04-21 20:18:54.000000000 -0700
+++ gas/app.c 2003-04-21 20:16:36.000000000 -0700
@@ -1297,7 +1297,8 @@ do_scrub_chars (get, tostart, tolen)
/* Some relatively `normal' character. */
if (state == 0)
{
- state = 11; /* Now seeing label definition */
+ if (lex[ch] == LEX_IS_SYMBOL_COMPONENT)
+ state = 11; /* Now seeing label definition */
}
else if (state == 1)
{