This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: designated initializer vs. long long for i386 assembler
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jan Beulich <jbeulich at novell dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 13 Mar 2007 05:48:35 -0700
- Subject: Re: RFC: designated initializer vs. long long for i386 assembler
- References: <20070212155323.GA8495@lucon.org> <20070213232407.GB15831@bubble.grove.modra.org> <20070214001412.GA30144@lucon.org> <20070214015134.GA8541@bubble.grove.modra.org> <20070214020138.GA30518@lucon.org> <20070312190508.GA7845@lucon.org> <45F66D2D.76E4.0078.0@novell.com>
On Tue, Mar 13, 2007 at 08:21:49AM +0000, Jan Beulich wrote:
> >>> "H. J. Lu" <hjl@lucon.org> 12.03.07 20:05 >>>
> >On Tue, Feb 13, 2007 at 06:01:38PM -0800, H. J. Lu wrote:
> >> On Wed, Feb 14, 2007 at 12:21:34PM +1030, Alan Modra wrote:
> >> > On Tue, Feb 13, 2007 at 04:14:12PM -0800, H. J. Lu wrote:
> >> > > I need much more than 2 bits, which won't fit in the current
> >> > > 32bit int.
> >> >
> >> > Then I suggest adding another field. I don't think we can force
> >> > people to use a C99 compiler to build binutils.
> >>
> >> Adding another field will lead to massive changes to x86 assembler.
> >> I will use long long if C99 feature isn't desirable.
> >>
> >> BTW, I compared long long vs int. There is not much slow down in
> >> assembler.
> >
> >We can use designated initializer in include/opcode/i386.h. We put a
> >generated copy of it, i386-inst.h, in gas/config, which doesn't
> >use designated initializer. tc-i386.c will include i386-inst.h
> >instead of opcode/i386.h. We will put a tool in gas to generate
> >gas/config/i386-inst.h from include/opcode/i386.h. We can require
> >that such a tool has to be compiled with a C99 compiler.
>
> Why would the compilation of a tool needed for building be any
> different from the compilation of any final code? If a system doesn't
> have C99 support, then a tool wouldn't build as much as gas itself
> would. Am I missing something?
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.
H.J.