From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80087.outbound.protection.outlook.com [40.107.8.87]) by sourceware.org (Postfix) with ESMTPS id 6CF623858437 for ; Tue, 16 Aug 2022 07:32:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6CF623858437 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FaTb1n3TATDZTonXW9/0rBoBlGFzEBLFqcRXaz6aJXZcvcZWEgmRMHdvaR+iF/kyWiaQtcxSkE1Z4kiylJmQtzWuhOudgwawhq6mvP7MJIt9MQvJrMvbsj5hFp5viro+vTFCucxwYJ5IA2hnTvnLvWZ0mPxciNMVnu9qlaCPvlCloolpFoJobHzsH5bJm4SbiwLUI6CTujoPPVv+9aho6ffPMcGB9UpyP1b1fj9vyGsk8xk7UjYkgV2wgLUQa3Xtqah1jxEuuxi4X8tb2jYhPv6hPyZ9RX/57DcCzzsIuKKqB9tNer9sbwXj04w42+mWUHbPxwkoOboeqRSfsgr4/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dPR8IW0r2+0wjprd273BBBJ2NIz9tudjm+4jY5uq9Rw=; b=j4HwIN6qo2Dym0WcMsgJnuAYSnW47eZO1xELmAhC/pJ/F2unu65RsuDwo7kKDp8/x6696SwL3nl4oS3jfmjeYtOOnz03gTd32Jybbeq6F8KbUsc7RnjZ5AFLX/Gr2Frf/sMRWtJrkxdur3J402BHe0VFnXlt8kVSXNH1NQ3cV98CXYVfDYhbpeRIfKbkpolNHlxLZgXqn9fmlqZwamife2ImccjiQbdGrVUKmPEPj+tT6qZH1Vly5Qp0uIeTsuLbs3H1VMxzyhRigDK/skSc4PEffDN1bILXwbq+1P7KgnrxVZfRMEP8L53PpQrKM0UEbecjqy4AdwZyMJL0Ms6EEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by DU0PR04MB9563.eurprd04.prod.outlook.com (2603:10a6:10:314::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Tue, 16 Aug 2022 07:32:05 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2d5d:bae0:430f:70ad]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2d5d:bae0:430f:70ad%4]) with mapi id 15.20.5525.010; Tue, 16 Aug 2022 07:32:05 +0000 Message-ID: <0ac5121d-5318-b065-57c6-b94085ed6b23@suse.com> Date: Tue, 16 Aug 2022 09:32:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: [PATCH 4/7] x86: improve match_template()'s diagnostics Content-Language: en-US To: Binutils References: <32216291-fd1f-4579-87de-d24cb7190894@suse.com> From: Jan Beulich In-Reply-To: <32216291-fd1f-4579-87de-d24cb7190894@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM6PR08CA0009.eurprd08.prod.outlook.com (2603:10a6:20b:b2::21) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c16f671-83ac-44dc-4b68-08da7f596af3 X-MS-TrafficTypeDiagnostic: DU0PR04MB9563:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rmnU9ZujoNEVG8Uf73eN5Oao+PWtjTXoIiYX/mCOEaxRopHrS1IOUqDM1SQVsUC+ouH1VY4579bz4lU1hvpM50e3snYTbasGhf6MPwhwR3cS2pCWLCZ1+JCAVXRBMmAdUvXuHrjK8IqoQ+kvQ955LUfOkge5ZD6ds/QV5TfMyNyTAVlqpsQS0xRT6SyyheeDm3Fdc2qYuua1xvkFLaPjiKyIvNr2AXaQeZHKuqhleIotbPUHms/MZ855icaLn/v1n0qAXWNmRazutwXRYmEQETkN/zqLHP8/RVzFqsXU8DKRrf0AbjfaM6vY0R29RKFVpocwqBk7cAWwXmwNehbbWkiILdTbIibT/rhErElLcOzqDMarN2mGEUWjj4FbhYBZ1dZ7epDwliqqT0DXBox+LT/5FZNpY90BttGfwP6S9zzG5sMypK+XBaloaaDPrqVwp1+akdJXjljd8smq30IvZcV8PuU1F6HiLHXmxYNhNEp3HSHN3QQz2djDyB/v1z9TLFDrt8W/69VFpjpQdrMb5rsAoxeP/V4CsnujCpmQX+21VDLrOh5bjyt8GpAKbFHASaCiySo0h3l9WjWbem6EMLGW+OcJeF2BsTvIlic3t84t464nahPMcGpyXvPIUSs3TSaaBmASrZRGuXjvn2I0evAxHaj5lov0ndu0sBhRhDofLTwJytAPqNmsoAFXyDdIvQNUvlHRiiFcc0upjUmMA6CPLjY+KTm2DoEsST2IjUR9jWlXmDmw0f8FX29CbpR9AScCbs2TYs2tLIhwA4mOAcX48qHqVC3BREK7z31n4hKD+bzeaKQgjqWjvGRKs56ChEtTI/OsESpnFyAeFkF93Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6560.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(39860400002)(366004)(376002)(396003)(346002)(6512007)(478600001)(26005)(66556008)(6486002)(41300700001)(2616005)(83380400001)(66476007)(31686004)(36756003)(38100700002)(6506007)(86362001)(31696002)(2906002)(6916009)(8936002)(4326008)(316002)(186003)(5660300002)(30864003)(8676002)(66946007)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d1lxb2pkSTZ1N2NwVWVDeU9QK2FXMUpwWlovNXAzNUh3dTFFcTNuR1Fhd1JJ?= =?utf-8?B?Znh5RmY4b0xTdUxkaGhqVU56djJOTVAyTkVnZTZJcWtwTk41bDhueGZkUk10?= =?utf-8?B?bm9ITi9LT0hJNFdONWs5akFNM3RPbWhQaVVKTm9SV0IrN3k3VmgzS2EwSko0?= =?utf-8?B?WmI2UjVIUElwU01qR1NuLytNdGthNWh2N3RpK08rWU01ZVR2NTZXdVJEOUlE?= =?utf-8?B?ME42aGxkL1hiZlJJRFN5RUxDdGFzNDY0MFIxRGl6UEkzMjJ3dStkUm9QMUJm?= =?utf-8?B?ZmdhWmdrcFh1aHNJcGNMaUdvdG9EM3paVVlDM1prUVBxZ3d6dmpZZUVNdytE?= =?utf-8?B?YjhOMVN3Q2V4QXFnMllLd1Nrem5rR1hLamNUb0wySS9Gc0xNRldoNUg1RFFF?= =?utf-8?B?OXhqSUtTdlpoVjJ5VWdncStubVdLa1VKK3pzSWFBRGFnWGkxbXhGZXBLenVx?= =?utf-8?B?ekUvaDZ2QUNndjNkVnV4TGV0Z1RlMHVodVdHZ3RxNFB2cFFuOVFtUzNzeEpK?= =?utf-8?B?ZXozYUUyUURybjlFekdnTnE2VmFqRUtMcGZrdlZWd2dNa296R1ZESE4zZTUw?= =?utf-8?B?SnQ1aG9ISW9wMzhrWVV3U21RcHZDT3k5VTB0RlMrT1IrZWQvMGpFZGlpS0cz?= =?utf-8?B?MmUrVjVDL0V5OUVYTEU1SnBnQWkxS3FkcVRLdlpzZWlNdXVzUjY2aElFd0k2?= =?utf-8?B?UzduMjFZc0VqZWJvRFY5ZUJsVGNiS2l1dG9RYUYyM1Y0TGhSek10bTlOZ254?= =?utf-8?B?dm1peWd6RG5DVWp2djBYSEova3doNjN5dUlSbTRQWU1GZUtPdUpXZjlSbEFN?= =?utf-8?B?Ti93N3grY2xIT3VaSDJZMjFuWjNXSWV0TFJpazBqbjVSbnZPUFBHbFJDSEtO?= =?utf-8?B?dlJ3em50bE91VEhpZ1JnK3gxdXozN3dndERySXFDUjBJUkJ6Rlh4MEhBUGxI?= =?utf-8?B?RCtuRlc5YkhYdjN0TnNhY1dMbWVaWTZYTmJVZ29jMFMwbjRqTllPMWs0Nndr?= =?utf-8?B?Ym12NG1YWHQ0Y2p1elZ3Qi8wNFpZdjRGRFYybW84dVBiU3JQVmhhUmtyNFVS?= =?utf-8?B?eXVMbmY0SXloMmVJWXBwMjNucG9NRjZ3bVlZMlZMSVljWitHR0FMQWdKd2ZU?= =?utf-8?B?QW5uTTlMVklFbHZDdExGWm5hVXkreUNKNXN6QVlVRGlvaHR6SEFpVFZUcGlL?= =?utf-8?B?UDBUUWZLZDZLVTcwNXovcndMdXJWdzQ0YXRiQTlyNUtKVlhmRTdlVk9HMDUz?= =?utf-8?B?dlNEVnVzS3dLYkU0RHV1M0cvdXVKSjZPMkFQbVZsMVZ0b1ZnUnBEQTgwWjZ2?= =?utf-8?B?NCtMbWdwaGlwVWYxcWdHUGlvZmVrMEQrU0FwVXlJeUhQTnVFR0FBUU95SzBZ?= =?utf-8?B?M2w2VWFWcFQvQS9UU3ZwWHYrNHZ5MXUwK05TNHFNUnMvRXVJZUVzdHcvOW5T?= =?utf-8?B?QTRSVUNCQ2NhSno5VHY1MjhxWXdyWWo4bU51bjJURSs5TDgyc0p1UUo3OTEx?= =?utf-8?B?TW9HcjJkb0xEWUtRYmR4cEtzdGVBZE1hdDNTRjBSMmxFTTl6Vzg0Z09EVXQv?= =?utf-8?B?NWRzSU1zaVZTUU9KRU1MTFgwZmhXTTZQNFFlS0hpbm9PQlY0NFJaOG9nYnVK?= =?utf-8?B?RDJFQk4vS05kZW9BdENYNFF5Z2oweFJ1Sm9NQXUvTmdoRDJMOFRONm4ybXpN?= =?utf-8?B?V1V1UVRHY1I4cG1SaXBENEpZT0p5STZOc0FaR0JJNTNsUU55N2s5NjdWUzVn?= =?utf-8?B?WHhpaFB3ZDBCQ0J0OEkwK2JmTTFzTnI5dFMvcExLMWVNblNVbGFXY2ZJWlEv?= =?utf-8?B?ZTB6WG5EanBQQStKWVk1dzhPZTlmQjRhR2gwZ1FJUkdiNEJNME01UGRjNGRt?= =?utf-8?B?K0FzVndGSEZ3d09sU3htOXpVdDFoR0RLUzc4QTQzbDBmdVRTK1hvTkE3Um9L?= =?utf-8?B?WGh0QkFWNTM5SWU3VFV0eHNVQzFTWXNTMDg4UzF2ZVozWjhyMXJCUllvN0Vo?= =?utf-8?B?NXVkM1I2Ylh2VGhYekJrbERnbVZJdUVFS3BHWTlGVVFzZFVRZ2tsbERhTndi?= =?utf-8?B?RDgxSDVHWmE2YVV0VllmUXpsMmM0YlZNOExVa3J3eVY4QmR6cVY4dlJlYW1l?= =?utf-8?Q?j1PWm5OK03y+Uk+JzknXMEGph?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c16f671-83ac-44dc-4b68-08da7f596af3 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2022 07:32:05.0742 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OM1aOWAlHzKoU6ap3MZslzrUak6D7CMDHayAB855YXSUWjEx1SJczysY0aYHsb3LJm/TopHYt+3lbeZuZCgFcw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9563 X-Spam-Status: No, score=-3030.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Tue, 16 Aug 2022 07:32:11 -0000 At the example of extractps $0, %xmm0, %xmm0 insertps $0, %xmm0, %eax (both having respectively the same mistake of using the wrong kind of destination register) it is easy to see that current behavior is far from ideal: The former results in "unsupported instruction" for 32-bit code simply because the 2nd template we have is a Cpu64 one. Instead we should aim at emitting the "best" possible error, which will typically be the one where we passed the largest number of checks. Generalize the original "specific_error" approach by making it apply to the entire matching loop, utilizing that line numbers increase as we pass further checks. --- As to the inval-tls testcase: Why is KMOV special? Are e.g. VMOV or other vector insns (legacy or EVEX-encoded) any different? Shouldn't the use of the respective reloc types be limited to _exactly_ the insns they are intended to be used with? Furthermore having this check in match_template() is unhelpful, as the resulting diagnostic isn't aiding in understanding what's wrong. Template matching should be left alone here, and the issue be diagnosed later, say directly in md_assemble() (alongside the various further consistency checks there) or in process_operands(). --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2083,12 +2083,7 @@ operand_size_match (const insn_template } if (!t->opcode_modifier.d) - { - mismatch: - if (!match) - i.error = operand_size_mismatch; - return match; - } + return match; /* Check reverse. */ gas_assert ((i.operands >= 2 && i.operands <= 3) @@ -2105,19 +2100,19 @@ operand_size_match (const insn_template if (t->operand_types[j].bitfield.class == Reg && !match_operand_size (t, j, given)) - goto mismatch; + return match; if (t->operand_types[j].bitfield.class == RegSIMD && !match_simd_size (t, j, given)) - goto mismatch; + return match; if (t->operand_types[j].bitfield.instance == Accum && (!match_operand_size (t, j, given) || !match_simd_size (t, j, given))) - goto mismatch; + return match; if ((i.flags[given] & Operand_Mem) && !match_mem_size (t, j, given)) - goto mismatch; + return match; } return match | MATCH_REVERSE; @@ -6386,6 +6381,17 @@ VEX_check_encoding (const insn_template return 0; } +/* Helper function for the progress() macro in match_template(). */ +static INLINE enum i386_error progress (enum i386_error new, + enum i386_error last, + unsigned int line, unsigned int *line_p) +{ + if (line <= *line_p) + return last; + *line_p = line; + return new; +} + static const insn_template * match_template (char mnem_suffix) { @@ -6397,8 +6403,9 @@ match_template (char mnem_suffix) i386_opcode_modifier suffix_check; i386_operand_type operand_types [MAX_OPERANDS]; int addr_prefix_disp; - unsigned int j, size_match, check_register; - enum i386_error specific_error = 0; + unsigned int j, size_match, check_register, errline = __LINE__; + enum i386_error specific_error = number_of_operands_mismatch; +#define progress(err) progress(err, specific_error, __LINE__, &errline) #if MAX_OPERANDS != 5 # error "MAX_OPERANDS must be 5." @@ -6436,36 +6443,33 @@ match_template (char mnem_suffix) suffix_check.no_ldsuf = 1; } - /* Must have right number of operands. */ - i.error = number_of_operands_mismatch; - for (t = current_templates->start; t < current_templates->end; t++) { addr_prefix_disp = -1; found_reverse_match = 0; + /* Must have right number of operands. */ if (i.operands != t->operands) continue; /* Check processor support. */ - i.error = unsupported; + specific_error = progress (unsupported); if (cpu_flags_match (t) != CPU_FLAGS_PERFECT_MATCH) continue; /* Check Pseudo Prefix. */ - i.error = unsupported; if (t->opcode_modifier.pseudovexprefix && !(i.vec_encoding == vex_encoding_vex || i.vec_encoding == vex_encoding_vex3)) continue; /* Check AT&T mnemonic. */ - i.error = unsupported_with_intel_mnemonic; + specific_error = progress (unsupported_with_intel_mnemonic); if (intel_mnemonic && t->opcode_modifier.attmnemonic) continue; /* Check AT&T/Intel syntax. */ - i.error = unsupported_syntax; + specific_error = progress (unsupported_syntax); if ((intel_syntax && t->opcode_modifier.attsyntax) || (!intel_syntax && t->opcode_modifier.intelsyntax)) continue; @@ -6491,7 +6495,7 @@ match_template (char mnem_suffix) } /* Check the suffix. */ - i.error = invalid_instruction_suffix; + specific_error = progress (invalid_instruction_suffix); if ((t->opcode_modifier.no_bsuf && suffix_check.no_bsuf) || (t->opcode_modifier.no_wsuf && suffix_check.no_wsuf) || (t->opcode_modifier.no_lsuf && suffix_check.no_lsuf) @@ -6500,6 +6504,7 @@ match_template (char mnem_suffix) || (t->opcode_modifier.no_ldsuf && suffix_check.no_ldsuf)) continue; + specific_error = progress (operand_size_mismatch); size_match = operand_size_match (t); if (!size_match) continue; @@ -6510,11 +6515,9 @@ match_template (char mnem_suffix) as the case of a missing * on the operand is accepted (perhaps with a warning, issued further down). */ + specific_error = progress (operand_type_mismatch); if (i.jumpabsolute && t->opcode_modifier.jump != JUMP_ABSOLUTE) - { - i.error = operand_type_mismatch; - continue; - } + continue; for (j = 0; j < MAX_OPERANDS; j++) operand_types[j] = t->operand_types[j]; @@ -6522,6 +6525,8 @@ match_template (char mnem_suffix) /* In general, don't allow - 64-bit operands outside of 64-bit mode, - 32-bit operands on pre-386. */ + specific_error = progress (mnem_suffix ? invalid_instruction_suffix + : operand_size_mismatch); j = i.imm_operands + (t->operands > i.imm_operands + 1); if (((i.suffix == QWORD_MNEM_SUFFIX && flag_code != CODE_64BIT @@ -6550,7 +6555,7 @@ match_template (char mnem_suffix) { if (VEX_check_encoding (t)) { - specific_error = i.error; + specific_error = progress (i.error); continue; } @@ -6711,6 +6716,8 @@ match_template (char mnem_suffix) i.types[1], operand_types[1]))) { + specific_error = progress (i.error); + /* Check if other direction is valid ... */ if (!t->opcode_modifier.d) continue; @@ -6735,6 +6742,7 @@ match_template (char mnem_suffix) operand_types[0]))) { /* Does not match either direction. */ + specific_error = progress (i.error); continue; } /* found_reverse_match holds which of D or FloatR @@ -6773,7 +6781,10 @@ match_template (char mnem_suffix) operand_types[3], i.types[4], operand_types[4])) - continue; + { + specific_error = progress (i.error); + continue; + } /* Fall through. */ case 4: overlap3 = operand_type_and (i.types[3], operand_types[3]); @@ -6788,7 +6799,10 @@ match_template (char mnem_suffix) operand_types[2], i.types[3], operand_types[3]))) - continue; + { + specific_error = progress (i.error); + continue; + } /* Fall through. */ case 3: overlap2 = operand_type_and (i.types[2], operand_types[2]); @@ -6803,7 +6817,10 @@ match_template (char mnem_suffix) operand_types[1], i.types[2], operand_types[2]))) - continue; + { + specific_error = progress (i.error); + continue; + } break; } } @@ -6814,14 +6831,14 @@ match_template (char mnem_suffix) /* Check if vector operands are valid. */ if (check_VecOperands (t)) { - specific_error = i.error; + specific_error = progress (i.error); continue; } /* Check if VEX/EVEX encoding requirements can be satisfied. */ if (VEX_check_encoding (t)) { - specific_error = i.error; + specific_error = progress (i.error); continue; } @@ -6829,11 +6846,13 @@ match_template (char mnem_suffix) break; } +#undef progress + if (t == current_templates->end) { /* We found no match. */ const char *err_msg; - switch (specific_error ? specific_error : i.error) + switch (specific_error) { default: abort (); --- a/gas/testsuite/gas/i386/inval-tls.l +++ b/gas/testsuite/gas/i386/inval-tls.l @@ -1,3 +1,3 @@ .*: Assembler messages: -.*:3: Error: operand size mismatch for `kmovd' -.*:4: Error: operand size mismatch for `kmovd' +.*:3: Error: .* `kmovd' +.*:4: Error: .* `kmovd' --- a/gas/testsuite/gas/i386/noavx512-1.l +++ b/gas/testsuite/gas/i386/noavx512-1.l @@ -1,14 +1,14 @@ .*: Assembler messages: -.*:25: Error: .*unsupported instruction.* +.*:25: Error: .*operand size mismatch.* .*:26: Error: .*unsupported masking.* .*:27: Error: .*unsupported masking.* -.*:47: Error: .*unsupported instruction.* +.*:47: Error: .*operand size mismatch.* .*:48: Error: .*unsupported masking.* .*:49: Error: .*unsupported masking.* .*:50: Error: .*not supported.* .*:51: Error: .*not supported.* .*:52: Error: .*not supported.* -.*:69: Error: .*unsupported instruction.* +.*:69: Error: .*operand size mismatch.* .*:70: Error: .*unsupported masking.* .*:71: Error: .*unsupported masking.* .*:72: Error: .*not supported.* @@ -17,7 +17,7 @@ .*:75: Error: .*not supported.* .*:76: Error: .*not supported.* .*:77: Error: .*not supported.* -.*:91: Error: .*unsupported instruction.* +.*:91: Error: .*operand size mismatch.* .*:92: Error: .*unsupported masking.* .*:93: Error: .*unsupported masking.* .*:94: Error: .*not supported.* @@ -27,7 +27,7 @@ .*:98: Error: .*not supported.* .*:99: Error: .*not supported.* .*:100: Error: .*not supported.* -.*:113: Error: .*unsupported instruction.* +.*:113: Error: .*operand size mismatch.* .*:114: Error: .*unsupported masking.* .*:115: Error: .*unsupported masking.* .*:116: Error: .*not supported.* @@ -40,7 +40,7 @@ .*:126: Error: .*not supported.* .*:127: Error: .*not supported.* .*:128: Error: .*not supported.* -.*:135: Error: .*unsupported instruction.* +.*:135: Error: .*operand size mismatch.* .*:136: Error: .*unsupported masking.* .*:137: Error: .*unsupported masking.* .*:138: Error: .*not supported.* @@ -54,7 +54,7 @@ .*:149: Error: .*not supported.* .*:150: Error: .*not supported.* .*:151: Error: .*not supported.* -.*:157: Error: .*unsupported instruction.* +.*:157: Error: .*operand size mismatch.* .*:158: Error: .*unsupported masking.* .*:159: Error: .*unsupported masking.* .*:160: Error: .*not supported.* --- a/gas/testsuite/gas/i386/noavx512-2.l +++ b/gas/testsuite/gas/i386/noavx512-2.l @@ -1,12 +1,12 @@ .*: Assembler messages: -.*:26: Error: .*unsupported instruction.* -.*:27: Error: .*unsupported instruction.* +.*:26: Error: .*unsupported masking.* +.*:27: Error: .*unsupported masking.* .*:29: Error: .*unsupported instruction.* .*:30: Error: .*unsupported instruction.* .*:32: Error: .*unsupported instruction.* .*:33: Error: .*unsupported instruction.* -.*:36: Error: .*unsupported instruction.* -.*:37: Error: .*unsupported instruction.* +.*:36: Error: .*unsupported masking.* +.*:37: Error: .*unsupported masking.* .*:39: Error: .*unsupported instruction.* .*:40: Error: .*unsupported instruction.* .*:43: Error: .*unsupported instruction.* --- a/gas/testsuite/gas/i386/x86-64-branch-4.l +++ b/gas/testsuite/gas/i386/x86-64-branch-4.l @@ -1,19 +1,19 @@ .*: Assembler messages: .*:2: Error: invalid instruction suffix for `call' .*:3: Error: invalid instruction suffix for `call' -.*:4: Error: operand type mismatch for `jmp' +.*:4: Error: operand (size|type) mismatch for `jmp' .*:5: Error: invalid instruction suffix for `jmp' .*:6: Error: invalid instruction suffix for `jmp' .*:7: Error: invalid instruction suffix for `ret' .*:8: Error: invalid instruction suffix for `ret' -.*:11: Error: operand type mismatch for `call' +.*:11: Error: operand (size|type) mismatch for `call' .*:12: Error: invalid instruction suffix for `call' .*:13: Error: invalid instruction suffix for `call' -.*:14: Error: operand size mismatch for `call' -.*:15: Error: operand type mismatch for `jmp' +.*:14: Error: operand (size|type) mismatch for `call' +.*:15: Error: operand (size|type) mismatch for `jmp' .*:16: Error: invalid instruction suffix for `jmp' .*:17: Error: invalid instruction suffix for `jmp' -.*:18: Error: operand size mismatch for `jmp' +.*:18: Error: operand (size|type) mismatch for `jmp' .*:19: Error: invalid instruction suffix for `ret' .*:20: Error: invalid instruction suffix for `ret' GAS LISTING .* --- a/gas/testsuite/gas/i386/x86-64-branch-5.l +++ b/gas/testsuite/gas/i386/x86-64-branch-5.l @@ -1,19 +1,19 @@ .*: Assembler messages: -.*:2: Error: unsupported syntax for `lcall' -.*:3: Error: unsupported syntax for `lfs' -.*:4: Error: unsupported syntax for `lfs' -.*:5: Error: unsupported syntax for `lgs' -.*:6: Error: unsupported syntax for `lgs' -.*:7: Error: unsupported syntax for `ljmp' -.*:8: Error: unsupported syntax for `lss' -.*:9: Error: unsupported syntax for `lss' -.*:12: Error: unsupported syntax for `call' -.*:13: Error: unsupported syntax for `lfs' -.*:14: Error: unsupported syntax for `lfs' -.*:15: Error: unsupported syntax for `lgs' -.*:16: Error: unsupported syntax for `lgs' -.*:17: Error: unsupported syntax for `jmp' -.*:18: Error: unsupported syntax for `lss' -.*:19: Error: unsupported syntax for `lss' +.*:2: Error: invalid instruction suffix for `lcall' +.*:3: Error: operand size mismatch for `lfs' +.*:4: Error: invalid instruction suffix for `lfs' +.*:5: Error: operand size mismatch for `lgs' +.*:6: Error: invalid instruction suffix for `lgs' +.*:7: Error: invalid instruction suffix for `ljmp' +.*:8: Error: operand size mismatch for `lss' +.*:9: Error: invalid instruction suffix for `lss' +.*:12: Error: operand (size|type) mismatch for `call' +.*:13: Error: operand size mismatch for `lfs' +.*:14: Error: operand size mismatch for `lfs' +.*:15: Error: operand size mismatch for `lgs' +.*:16: Error: operand size mismatch for `lgs' +.*:17: Error: operand (size|type) mismatch for `jmp' +.*:18: Error: operand size mismatch for `lss' +.*:19: Error: operand size mismatch for `lss' GAS LISTING .* #pass --- a/gas/testsuite/gas/i386/x86-64-inval-tls.l +++ b/gas/testsuite/gas/i386/x86-64-inval-tls.l @@ -1,3 +1,3 @@ .*: Assembler messages: -.*:3: Error: operand size mismatch for `kmovq' -.*:4: Error: operand size mismatch for `kmovq' +.*:3: Error: .* `kmovq' +.*:4: Error: .* `kmovq'