From 1212781b35c9e0080db6ee546cf5e7ebd45d6b09 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 22 Mar 2018 08:33:38 +0100 Subject: ix86: allow HLE store of accumulator to absolute address Since they're shorter to encode, the 0xa0...0xa3 encodings are preferred for moves between accumulator and absolute address outside of 64-bit mode. With HLE release semantics this encoding is unsupported though, with the assembler raising an error. The operation is valid though, we merely need to pick the longer encoding in that case. --- gas/config/tc-i386.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gas/config') diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 8905de4..1a05f48 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5427,6 +5427,14 @@ match_template (char mnem_suffix) && operand_type_equal (&i.types [0], &acc32) && operand_type_equal (&i.types [1], &acc32)) continue; + /* xrelease mov %eax, is another special case. It must not + match the accumulator-only encoding of mov. */ + if (flag_code != CODE_64BIT + && i.hle_prefix + && t->base_opcode == 0xa0 + && i.types[0].bitfield.acc + && operand_type_check (i.types[1], anymem)) + continue; /* If we want store form, we reverse direction of operands. */ if (i.dir_encoding == dir_encoding_store && t->opcode_modifier.d) -- cgit v1.1