From 2fb5be8dac9db623ef6e2a61b1f5b09fd246872b Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 11 Jul 2018 10:28:56 +0200 Subject: x86: drop {,reg16_}inoutportreg variables The checking against reg16_inoutportreg can be had with a simple test of a bit, and the value setting from inoutportreg can be replaced by using the actual register's reg_type field. Note that the so far redundant 2nd instance of OPERAND_TYPE_INOUTPORTREG is left in place, for its use in type_names[]. --- gas/ChangeLog | 6 ++++++ gas/config/tc-i386.c | 9 ++------- opcodes/ChangeLog | 7 +++++++ opcodes/i386-gen.c | 4 ---- opcodes/i386-init.h | 10 ---------- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index e6a6d09..712bec5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2018-07-11 Jan Beulich + * config/tc-i386.c (inoutportreg, reg16_inoutportreg): Delete. + (i386_att_operand): Replace uses of reg16_inoutportreg and + inoutportreg. + +2018-07-11 Jan Beulich + * config/tc-i386.c (output_insn): Remove check_prefix label and fold remaining expression. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 61c1518..baecdec 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1832,10 +1832,6 @@ operand_type_xor (i386_operand_type x, i386_operand_type y) static const i386_operand_type acc32 = OPERAND_TYPE_ACC32; static const i386_operand_type acc64 = OPERAND_TYPE_ACC64; -static const i386_operand_type inoutportreg - = OPERAND_TYPE_INOUTPORTREG; -static const i386_operand_type reg16_inoutportreg - = OPERAND_TYPE_REG16_INOUTPORTREG; static const i386_operand_type disp16 = OPERAND_TYPE_DISP16; static const i386_operand_type disp32 = OPERAND_TYPE_DISP32; static const i386_operand_type disp32s = OPERAND_TYPE_DISP32S; @@ -9637,14 +9633,13 @@ i386_att_operand (char *operand_string) /* Special case for (%dx) while doing input/output op. */ if (i.base_reg - && operand_type_equal (&i.base_reg->reg_type, - ®16_inoutportreg) + && i.base_reg->reg_type.bitfield.inoutportreg && i.index_reg == 0 && i.log2_scale_factor == 0 && i.seg[i.mem_operands] == 0 && !operand_type_check (i.types[this_operand], disp)) { - i.types[this_operand] = inoutportreg; + i.types[this_operand] = i.base_reg->reg_type; return 1; } diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index ec8587c..4ff2523 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,12 @@ 2018-07-11 Jan Beulich + * i386-gen.c (operand_type_init): Remove + OPERAND_TYPE_REG16_INOUTPORTREG entry and one instance of + OPERAND_TYPE_INOUTPORTREG. + * i386-init.h: Re-generate. + +2018-07-11 Jan Beulich + * i386-opc.tbl (wrssd, wrussd): Add Dword. (wrssq, wrussq): Add Qword. * i386-tbl.h: Re-generate. diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index e976027..9b5314c 100644 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -444,10 +444,6 @@ static initializer operand_type_init[] = "Reg32|Acc|Dword" }, { "OPERAND_TYPE_ACC64", "Reg64|Acc|Qword" }, - { "OPERAND_TYPE_INOUTPORTREG", - "InOutPortReg" }, - { "OPERAND_TYPE_REG16_INOUTPORTREG", - "Reg16|InOutPortReg" }, { "OPERAND_TYPE_DISP16_32", "Disp16|Disp32" }, { "OPERAND_TYPE_ANYDISP", diff --git a/opcodes/i386-init.h b/opcodes/i386-init.h index 75ee12d..15ef742 100644 --- a/opcodes/i386-init.h +++ b/opcodes/i386-init.h @@ -1452,16 +1452,6 @@ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, \ 0, 0, 0 } } -#define OPERAND_TYPE_INOUTPORTREG \ - { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0 } } - -#define OPERAND_TYPE_REG16_INOUTPORTREG \ - { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0 } } - #define OPERAND_TYPE_DISP16_32 \ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ -- cgit v1.1