PowerPC gas -many

Nick Clifton nickc@redhat.com
Tue Sep 2 07:23:00 GMT 2003


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



More information about the Binutils mailing list