public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RFC: Adding more bits to opcode_modifier and operand_types in x86 assembler
@ 2006-07-06 16:29 H. J. Lu
  2006-07-10  8:58 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: H. J. Lu @ 2006-07-06 16:29 UTC (permalink / raw)
  To: binutils

I found a need to add more bits to opcode_modifier and operand_types in
template in x86 assembler. They are currently 32bits and there are no
unused bits left. I am considering 2 choices:

1. Change them to unsigned long long.
   Pros: Other 32bit ports have used long long. Minimal changes are
   required.
   Cons: Compiler has to support long long. We may run out bits later.
2. Change them to use bitfields.
   Pros: More extensible. No long long support is needed.
   Cons: Need significant changes. It isn't easy to initialize 1000+
   structures with 100+ fields. Designated initializers help. But it
   needs C99 support.

Both choices will work with the current gcc. I prefer bitfields if
designated initializers can be used. It looks that there are more
compilers with long long support than with designated initializer
support. I'd like to use unsigned long long first and change to
bitfields later when designated initializer support can be required
by binutils.

Any comments?


H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFC: Adding more bits to opcode_modifier and operand_types in x86 assembler
  2006-07-06 16:29 RFC: Adding more bits to opcode_modifier and operand_types in x86 assembler H. J. Lu
@ 2006-07-10  8:58 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2006-07-10  8:58 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Thu, Jul 06, 2006 at 09:29:25AM -0700, H. J. Lu wrote:
> I'd like to use unsigned long long first and change to
> bitfields later when designated initializer support can be required
> by binutils.

I think it's a little soon to require a C99 feature.  We haven't even
converted all the K&R code to C90..

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-10  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-06 16:29 RFC: Adding more bits to opcode_modifier and operand_types in x86 assembler H. J. Lu
2006-07-10  8:58 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).