From 1a42a9fe4e60599bba1f047743a5b8b2ba96ee1f Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 12 Apr 2022 09:01:55 +0200 Subject: x86: make {disp16} work similarly to {disp32} In a few places {disp32} was handled specially when really {disp16} wants handling just the same. --- gas/config/tc-i386.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gas/config') diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index c2678ea..c26b654 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4937,7 +4937,7 @@ md_assemble (char *line) /* Don't optimize displacement for movabs since it only takes 64bit displacement. */ if (i.disp_operands - && i.disp_encoding != disp_encoding_32bit + && i.disp_encoding <= disp_encoding_8bit && (flag_code != CODE_64BIT || strcmp (mnemonic, "movabs") != 0)) optimize_disp (); @@ -6304,7 +6304,7 @@ check_VecOperands (const insn_template *t) /* Check vector Disp8 operand. */ if (t->opcode_modifier.disp8memshift - && i.disp_encoding != disp_encoding_32bit) + && i.disp_encoding <= disp_encoding_8bit) { if (i.broadcast.type) i.memshift = t->opcode_modifier.broadcast - 1; @@ -8772,7 +8772,7 @@ output_branch (void) } code16 = flag_code == CODE_16BIT ? CODE16 : 0; - size = i.disp_encoding == disp_encoding_32bit ? BIG : SMALL; + size = i.disp_encoding > disp_encoding_8bit ? BIG : SMALL; prefix = 0; if (i.prefix[DATA_PREFIX] != 0) -- cgit v1.1