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: [PATCH 03/13] x86: introduce operand type "class"


On Wed, Oct 30, 2019 at 1:24 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> Many operand types, in particular the various kinds of registers, can't
> be combined with one another (neither in templates nor in register
> entries), and hence it is not a good use of resources (memory as well as
> execution time) to represent them as individual bits of a bit field.
>
> gas/
> 2019-10-XX  Jan Beulich  <jbeulich@suse.com>
>
>         * config/tc-i386.c (operand_type_set, operand_type_and,
>         operand_type_and_not, operand_type_or, operand_type_xor): Handle
>         "class" field specially.
>         (anyimm): New.
>         (operand_type_check, operand_size_match,
>         operand_type_register_match, pi, md_assemble, is_short_form,
>         process_suffix, check_byte_reg, check_long_reg, check_qword_reg,
>         check_word_reg, process_operands, build_modrm_byte): Use "class"
>         instead of "reg" field.
>         (optimize_imm): Likewise. Reduce redundancy. Adjust calculation
>         of "allowed".
>
> opcodes/
> 2019-10-XX  Jan Beulich  <jbeulich@suse.com>
>
>         * i386-gen.c (operand_type_init): Add Class=. New
>         OPERAND_TYPE_ANYIMM entry.
>         (operand_classes): New.
>         (operand_types): Drop Reg entry.
>         (output_operand_type): New parameter "class". Process it.
>         (process_i386_operand_type): New local variable "class".
>         (main): Adjust static assertions.
>         * i386-opc.h (CLASS_WIDTH): Define.
>         (enum operand_class): New.
>         (Reg): Replace by Class. Adjust comment.
>         (union i386_operand_type): Replace reg by class.
>         * i386-opc.tbl (Reg8, Reg16, Reg32, Reg64, FloatReg): Add
>         Class=.
>         * i386-reg.tbl: Replace Reg by Class=Reg.
>         * i386-init.h: Re-generate.
>

OK.

Thanks.


-- 
H.J.


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