RFC: designated initializer vs. long long for i386 assembler

Nick Clifton nickc@redhat.com
Thu Feb 22 10:42:00 GMT 2007


Hi Guys,

Ian Lance Taylor 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.
>>> "long long" _is_ a C99 feature.  GCC had it before of course,
>>> but not all the world builds binutils using GCC ;-)

> The difference is that those are only built as cross-tools.  We
> decided a long time ago to permit requiring gcc when building a
> cross-tool.  But as far as I know we haven't decided to permit
> requiring gcc, or a C99 compiler, when building a native tool.

Ian is correct.  We still support building the native tools using native 
compilers and therefore we should not be using long longs (or designated 
initializers) for the x86 port.

H.J.: Using long longs is still problematical - as you pointed out 
originally we can still run out of space with them.  I think that the 
best solution will be to bite the bullet now and convert the 
opcode_modifier field to a fixed size array.  (Which can be extended in 
the future).

In order to help avoid the problems with not initializing the correct 
parts of this array you could create a series of macros to do the 
initializing for you.  Or you could use something like the ia64-gen 
program to create the initialization code for you.

Cheers
   Nick



More information about the Binutils mailing list