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]

Re: RFC: PowerPC GAS changes


> Date: Wed, 06 Sep 2000 16:51:03 -0700
> From: Mark Hatle <fray@mvista.com>

> Ok.  6-bits (for right now I'm assuming the top 6 bits in flags can be
> masked out easily) would allow a max of 63 CPUs before we break. 
> Is that enough?  Right now I know of: 401, 403, 405, 5xx??, 601, 603,
> 604, 620, 630?, 750, 823, 850, 860, 7400, 8240, 8260.  Lets assume 20
> current CPUs.  Some of which can be defaulted back down, so that leaves
> us
> around 15 CPU types.  48 CPUs to go, is that enough room to grow?  What
> will the implications be in 5 years if all 48 spots are filled?

You can always add more bits to the size of the cpu field, assuming
there are bits available.  I doubt Motorola will release 10 new CPUs a
year...

...
> Now start adding in the Extended instructions for the SPRs on the 601,
> 603,
> 604, 750, 7400, 8xx.  As you can see it starts to grow exponentially. 
> Even
> the PowerPC manual specifies 11 "optional" instructions that any PPC can
> choose to implement or not.

If you think there will be too many categories of instructions to have
one bit per category fit into 32 bits, one technique is to change the
flag word into a plain integer to hold a category number, so that the
test for whether an opcode is valid for an ISA looks like

#define OPCODE_VALID_FOR_ISA (opcode, isa) \
  ((powerpc_isa_table[isa][opcode->category / 32]  \
    & (1 << opcode->category % 32)) != 0)

where 'category' is the new name for 'flags' in the current opcode
structure.  This can easily handle 100 or more categories with
no significant cost for the ISA table.

The important thing is that the opcode table, which is big, doesn't 
- use much more memory
- become unreadable or difficult to change
- become more expensive to parse, particularly in the disassembler

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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