diff options
author | Jan Beulich <jbeulich@suse.com> | 2019-07-16 09:30:29 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2019-07-16 09:30:29 +0200 |
commit | 21df382b918888de64749e977f185c4e10a5b838 (patch) | |
tree | 0304ccc5838584e7f3cadb92a206e4a2b616fed8 /gas/config/tc-i386-intel.c | |
parent | 206e6c58a769f9ec63827b8ca3952b0cd8c828ba (diff) | |
download | gdb-21df382b918888de64749e977f185c4e10a5b838.zip gdb-21df382b918888de64749e977f185c4e10a5b838.tar.gz gdb-21df382b918888de64749e977f185c4e10a5b838.tar.bz2 |
x86: fold SReg{2,3}
They're the only exception to there generally being no mix of register
kinds possible in an insn operand template, and there being two bits per
operand for their representation is also quite wasteful, considering the
low number of uses. Fold both bits and deal with the little bit of
fallout.
Also take the liberty and drop dead code trying to set REX_B: No segment
register has RegRex set on it.
Additionally I was quite surprised that PUSH/POP with the permitted
segment registers is not covered by the test cases. Add the missing
pieces.
Diffstat (limited to 'gas/config/tc-i386-intel.c')
-rw-r--r-- | gas/config/tc-i386-intel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c index a2cd286..8f738b9 100644 --- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -283,7 +283,7 @@ i386_intel_simplify_register (expressionS *e) as_bad (_("invalid use of register")); return 0; } - if (i386_regtab[reg_num].reg_type.bitfield.sreg3 + if (i386_regtab[reg_num].reg_type.bitfield.sreg && i386_regtab[reg_num].reg_num == RegFlat) { as_bad (_("invalid use of pseudo-register")); @@ -984,8 +984,7 @@ i386_intel_operand (char *operand_string, int got_a_float) as_bad (_("segment register name expected")); return 0; } - if (!i386_regtab[expP->X_add_number].reg_type.bitfield.sreg2 - && !i386_regtab[expP->X_add_number].reg_type.bitfield.sreg3) + if (!i386_regtab[expP->X_add_number].reg_type.bitfield.sreg) { as_bad (_("invalid use of register")); return 0; |