This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PowerPC gas -many
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: Anton Blanchard <anton at samba dot org>, Paul Mackerras <paulus at au1 dot ibm dot com>
- Date: Tue, 02 Sep 2003 08:12:05 +0100
- Subject: Re: PowerPC gas -many
- References: <20030902004925.GD1320@bubble.sa.bigpond.net.au>
Hi Alan,
> I realize there are some difficulties. For instance, some instructions
> have different encodings (eg. Power4 branch hint bits), or different
> operands (eg. cmp) depending on the flavour we are assembling. Perhaps
> the differing encoding problem could be fixed by allowing -many to
> modify the current set of accepted instructions, so that eg.
> "-mpower4 -many" means assemble for any ppc arch but choose power4 in
> preference to other possible encodings.
>
> Comments?
Wouldn't it be simpler to drop the "-many" switch since as you point
out the correct choice of instruction coding cannot always be
guaranteed. Instead you could have a pseudo op (eg ".machine") which
could be used to select the desired architecture at the desired point
in the source. ie:
.machine BookE
...
.machine Power4
...
.machine Generic
...
The "Generic" machine type (or whatever name is chosen) would restrict
the assembler to accepting only those instructions which are common to
all PowerPC implementations.
Cheers
Nick