John David Anglin | 30 Nov 17:13
Picon

Re: [PATCH] hppa-linux-gas binutils patch

> deller <at> c3000:~/binutils/run/bin$ cat test.s
> AA       .equ  4
> BB      .equ  6
> deller <at> c3000:~/binutils/run/bin$ as test.s
> test.s: Assembler messages:
> test.s:1: Error: Unknown opcode: `aa'
> test.s:2: Error: Invalid operands

This is because the linux target was changed to require colons after
labels.  As a result, operands can start in the first column of a line.
Under hpux, there needs to be at least one white space character before
an operand and labels have to start in the first column.

> although as.info states:
> 
> 7.37 `.equ SYMBOL, EXPRESSION'
> ==============================
> 
> This directive sets the value of SYMBOL to EXPRESSION.  It is
> synonymous with `.set'; see *Note `.set': Set.
> 
>    The syntax for `equ' on the HPPA is `SYMBOL .equ EXPRESSION'.

This doesn't reflect that SYMBOL needs to be followed by a colon
on HPPA linux.  So, the documentation needs updating.

Probably, the linux should have been updated to use the normal GNU
syntax when it was introduced.  Now, updating the syntax involves a
potential compatibility break with GCC and existing assembler code.
At the moment, I don't see a strong need to do the update.

Dave
--

-- 
J. David Anglin                                  dave.anglin <at> nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Gmane