This is the mail archive of the binutils@sourceware.org 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: RFC: designated initializer vs. long long for i386 assembler


On Tue, Apr 03, 2007 at 07:14:00PM -0400, Michael Meissner wrote:
> 
> How many new instruction types are you guys adding :-) Note, I don't mean
> number of new instructions, but instructions that need different operand
> modifiers.

I need a lot. All those bits, cpu_flags, opcode_modifier and
operand_types, should be extendable.

> 
> Even if we posit adding operand_modifier2 as an array and use { ... }, we can
> still hide it in macros like I suggested.
> 

It isn't as clean as bitfield. Since we have to change it, why not
do it right once for all?

> I just did a simple analysis, and there are only 87 distinct bit combintions
> for all of the current operands in the FSF sources.  I could imagine changing
> operand_modifier into an enum, that indexes into a structure/array for each of

I assume you meant by

enum
{
  x = 1;
  x = 2;
  x = 4;
  ....
};

It isn't much better than today. Bitfield should work nicely with
i386-opc.c generated from a table. I will implement it in a few
weeks.


H.J.


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