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]

RFC: Adding more bits to opcode_modifier and operand_types in x86 assembler


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.


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