From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 33CFF385480F for ; Mon, 22 Mar 2021 16:45:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 33CFF385480F X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 52CFCAF0D; Mon, 22 Mar 2021 16:45:31 +0000 (UTC) Subject: [PATCH 6/8] x86: re-number PREFIX_0X To: Binutils References: From: Jan Beulich Message-ID: <67c381fe-2030-7750-d258-6257174100c3@suse.com> Date: Mon, 22 Mar 2021 17:45:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3033.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2021 16:45:33 -0000 In preparation to use PREFIX_0X attributes also in VEX/XOP/EVEX encoding templates, renumber the pseudo-enumerators such that their values can then also be used directly in the respective prefix bit fields. gas/ 2021-03-XX Jan Beulich * config/tc-i386.c (pte): Re-order opc_pfx[] entries. opcodes/ 2021-03-XX Jan Beulich * i386-opc.h (PREFIX_0XF2, PREFIX_0XF3): Excahnge values. Extend comment. * i386-tbl.h: Re-generate. --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -3239,7 +3239,7 @@ pi (const char *line, i386_insn *x) static void pte (insn_template *t) { - static const unsigned char opc_pfx[] = { 0, 0x66, 0xf2, 0xf3 }; + static const unsigned char opc_pfx[] = { 0, 0x66, 0xf3, 0xf2 }; static const char *const opc_spc[] = { NULL, "0f", "0f38", "0f3a", NULL, NULL, NULL, NULL, "XOP08", "XOP09", "XOP0A", --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -593,16 +593,17 @@ enum #define SPACE_XOP09 9 #define SPACE_XOP0A 0xA OpcodeSpace, - /* Opcode prefix: + /* Opcode prefix (values chosen to be usable directly in + VEX/XOP/EVEX pp fields): 0: None 1: Add 0x66 opcode prefix. - 2: Add 0xf2 opcode prefix. - 3: Add 0xf3 opcode prefix. + 2: Add 0xf3 opcode prefix. + 3: Add 0xf2 opcode prefix. */ #define PREFIX_NONE 0 #define PREFIX_0X66 1 -#define PREFIX_0XF2 2 -#define PREFIX_0XF3 3 +#define PREFIX_0XF3 2 +#define PREFIX_0XF2 3 OpcodePrefix, /* number of VEX source operands: 0: <= 2 source operands.