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 1/4] x86: replace Reg8, Reg16, Reg32, and Reg64


On Fri, Dec 15, 2017 at 2:32 AM, Jan Beulich <JBeulich@suse.com> wrote:
> Use a combination of a single new Reg bit and Byte, Word, Dword, or
> Qword instead.
>
> Besides shrinking the number of operand type bits this has the benefit
> of making register handling more similar to accumulator handling (a
> generic flag is being accompanied by a "size qualifier"). It requires,
> however, to split a few insn templates, as it is no longer correct to
> have combinations like Reg32|Reg64|Byte. This slight growth in size will
> hopefully be outweighed by this change paving the road for folding a
> presumably much larger number of templates later on.
>
> gas/
> 2017-12-15  Jan Beulich  <jbeulich@suse.com>
>
>         * config/tc-i386.c (operand_type_check, pi): Switch .reg<N> to
>         just .reg.
>         (operand_size_match): Qualify .anysize check with .reg one.
>         Extend .acc check to also cover .reg.
>         (operand_type_register_match): Drop m0 and m1 parameters. Switch
>         .reg<N> to .byte/.word/.dword/.qword. Drop .acc special
>         handling.
>         (md_assemble): Expand .reg8 checks to .reg plus .bytes ones.
>         (optimize_imm, process_suffix, check_byte_reg, check_long_reg,
>         check_qword_reg, check_word_reg): Expand .reg<N> checks to .reg
>         plus size ones.
>         (match_template): Drop arguments from calls to
>         operand_type_register_match().
>         (build_modrm_byte, i386_addressing_mode, i386_index_check,
>         parse_real_register): Replace .reg<N> checks.
>         * config/tc-i386-intel.c (i386_intel_simplify,
>         i386_intel_operand): Switch .reg16 to .word.
>
> opcodes/
> 2017-12-15  Jan Beulich  <jbeulich@suse.com>
>
>         * i386-gen.c (operand_type_shorthands): New.
>         (opcode_modifiers): Replace Reg<N> with just Reg.
>         (set_bitfield_from_cpu_flag_init): Rename to
>         set_bitfield_from_shorthand. Drop value parameter. Process
>         operand_type_shorthands.
>         (set_bitfield): Adjust call accordingly.
>         * i386-opc.h (enum of operand types): Replace Reg<N> with just
>         Reg.
>         (union i386_operand_type): Replace reg<N> with just reg.
>         * i386-opc.tbl (extractps, pextrb, pextrw, pinsrb, pinsrw,
>         vextractps, vpextrb, vpextrw, vpinsrb, vpinsrw): Split into
>         separate register and memory forms.
>         * i386-reg.tbl (al): Drop Byte.
>         (ax): Drop Word.
>         (eax): Drop Dword.
>         (rax): Drop Qword.
>         * i386-init.h, i386-tbl.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]