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, Mar 13, 2007 at 08:14:22AM -0700, Ian Lance Taylor wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
> 
> > The generated file, i386-inst.h, should be checked into CVS. People
> > who change include/opcode/i386.h is responsible to regenerate
> > i386-inst.h with the tool compiled with a C99 compiler. They are
> > the only people who need a C99 compiler.
> 
> That sounds too complicated to me.  If you're going to go that far,
> just invent a syntax which lets you specify what you want, and write a
> little tool which parses that syntax.  Then you don't need to worry
> about keeping the generated file up to date.
> 
> Or, simpler, just wrap every entry in i386.h in a macro
>   OP(name, bytes, val, ...)
> and expand to
>   name, bytes, val, ..., (flags >> 32), (flags & 0xffff), ...
> 

I want to use bitfield since we are using 32bits already. We will
add more. The macro

OP(name, bytes, val, ...)

will be too long and won't be easy to add more bits.

> Of course it would be super nice to move the opcode table from
> include/opcode/i386.h into opcodes/i386-opc.c.

I can do that. But opcodes/i386-opc.c will be generated from
a tool compiled with a C99 compiler so that I can use
designated initializer in opcodes/i386-opc.h.


H.J.


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