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: PowerPC gas -many


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


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