This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Check for valid label


Hi H.J.

> 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.

The patch is OK, (although it could make use of the IS_SYMBOL_COMPONENT
macro, and it ought to fix up the formatting of the comment as well),
but it does not really solve the problem.  Try assembling this source
file:

 (p7) hint @pause
^
|
 - note the space before the (p7)

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]