[PATCH 08/13] x86: introduce operand type "instance"

H.J. Lu hjl.tools@gmail.com
Thu Oct 31 19:28:00 GMT 2019


On Wed, Oct 30, 2019 at 1:26 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> Special register "class" instances 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.
>
> Furthermore the generalization becoming possible will allow
> improvements to the handling of insns accepting only individual
> registers as their operands.
>
> 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
>         "instance" field specially.
>         (operand_size_match, md_assemble, match_template, process_suffix,
>         check_byte_reg, check_long_reg, check_qword_reg, check_word_reg,
>         process_operands, build_modrm_byte): Use "instance" instead of
>         "acc" / "inoutportreg" / "shiftcount" fields.
>         (optimize_imm): Adjust comment.
>
> opcodes/
> 2019-10-XX  Jan Beulich  <jbeulich@suse.com>
>
>         * i386-gen.c (operand_type_init): Adjust
>         OPERAND_TYPE_INOUTPORTREG, OPERAND_TYPE_SHIFTCOUNT,
>         OPERAND_TYPE_FLOATACC, OPERAND_TYPE_ACC8, OPERAND_TYPE_ACC16,
>         OPERAND_TYPE_ACC32, and OPERAND_TYPE_ACC64 entries.
>         (operand_instances): New.
>         (operand_types): Drop InOutPortReg, ShiftCount, and Acc entries.
>         (output_operand_type): New parameter "instance". Process it.
>         (process_i386_operand_type): New local variable "instance".
>         (main): Adjust static assertions.
>         * i386-opc.h (INSTANCE_WIDTH): Define.
>         (enum operand_instance): New.
>         (Acc, InOutPortReg, ShiftCount): Replace by ClassInstance.
>         (union i386_operand_type): Replace acc, inoutportreg, and
>         shiftcount by instance.
>         * i386-opc.tbl (Acc, InOutPortReg, ShiftCount): Define.
>         * i386-reg.tbl (st, al, cl, ax, dx, eax, rax, xmm0, st(0)):
>         Add Instance=.
>         * i386-init.h, i386-tbl.h: Re-generate.
>

OK.

Thanks.

-- 
H.J.



More information about the Binutils mailing list