From 691963912563534ed4eb4dd5d1b4349e3cd74ece Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 3 Feb 2023 08:21:11 +0100 Subject: [PATCH] x86-64: respect MOVABS when choosing alternative encodings The alternative encoding is valid for MOV, but there's no such thing for MOVABS. --- gas/config/tc-i386.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 438180cf4e8..235deb841c8 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6888,7 +6888,8 @@ match_template (char mnem_suffix) continue; if (t->base_opcode == MOV_AX_DISP32 - && t->opcode_modifier.opcodespace == SPACE_BASE) + && t->opcode_modifier.opcodespace == SPACE_BASE + && t->mnem_off != MN_movabs) { /* Force 0x8b encoding for "mov foo@GOT, %eax". */ if (i.reloc[0] == BFD_RELOC_386_GOT32) -- 2.30.2