From patchwork Fri Feb 23 11:11:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 205315 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp512366dyb; Fri, 23 Feb 2024 03:11:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVeg/b/x9x7du/tpvwTZ1QOjR7lhh3I4zVwtHxVLOF9LhVct5GK0y4chJAScQMT7zG2bfx8fX6uJzaMMyG3+w1KoNP1rA== X-Google-Smtp-Source: AGHT+IHDhWc6h7x+kmYgIGRJQgt6BcyZPcL7jslTj22yMuk1xgFxc6m31pQVgPrtWQkt6EDFGuHR X-Received: by 2002:a05:622a:190b:b0:42d:ae83:e319 with SMTP id w11-20020a05622a190b00b0042dae83e319mr1787343qtc.18.1708686707706; Fri, 23 Feb 2024 03:11:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708686707; cv=pass; d=google.com; s=arc-20160816; b=EEgl6LM2FuQw/PSyBEU8jpWGdl65CrZWqNEp58lnBw3WGo+OfsiNtUs/wvfEe3GKsx IqXuPO31FxMNoS+FKGXcQdKpmgwD1Ah8ow6SYCDE4QluDExZXm3exiRAmdIaJO5z34d8 UBviAS9hHzGkTlQ0Gg8fbCV+Wq11Ihh9ckg8BX/pKuBVMAszhZWW4H5hGs95+zyztfIN wshAnJ1EjiAASwMXawoXknWElrsNoicr8cAwHU1Lepvz66Kj74AuFL9PbeXjU8WN+Nas EnnQ2BBa0sx1apmLEWCYc/0ZB62wc1lDgzUvR2wzi8k+ufvp3BFJX0WNradJ/B3zWvWJ lGTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :in-reply-to:autocrypt:references:cc:to:from:content-language :subject:user-agent:mime-version:date:message-id:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=InXRxv07IJOnZ04sjat+bqrdTcpHFa/O1trlDvaZaLc=; fh=2DbSPqOhyO7CNtGa024QKgSiHKlKGVt2h+1rlgWLnZI=; b=PqKgegj1Lc5ebYDM73ElysBR9KHmnskLTI1Q8sIQdFSXO7pL3WJ6ZGUoD2obOmhZMT q8dmDH04qyv8i3rjQhwHo/fPC7asC2wVxsiCffwVO6Lv0RYmyE0CL2++Lh/PCUXq2nT8 AvFpvljfwz2MbP3AYobpRRkfGxtx17S6FE+b76m9771tWoafNkhl+tHAbPTOdHKkkDBj kXaemDzvysIhZo+WghoNb4zY65YgDmx1eYlVEpXUV1F/2s3sKV0odsqLNESTv9xhsKDL 41wqSw/NAVQRsZYeqiXsxu64DyBU0lybDNaMC36bjN/IM342+JdzMHdcjEjPIZ2004cg PqBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=TqgNSVCe; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s13-20020ac8758d000000b0042dfc37f370si12571321qtq.197.2024.02.23.03.11.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 03:11:47 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=TqgNSVCe; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5120C385800E for ; Fri, 23 Feb 2024 11:11:47 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 669F538582A4 for ; Fri, 23 Feb 2024 11:11:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 669F538582A4 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 669F538582A4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::62f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708686697; cv=none; b=aViOO1k7HPsr/oJb70V1RQrgTqq+GfX6Js667CSTMqvJIAnOZFyXAkXt4U7qqcVZVp8Uz6gF1KWZz3CVAEpwYNFY7Wmv+XX5tUIVlT2h4a4u+Twd3+D46etx/kUhRzYOXLsEnsAPK1TRaadkNQkzPLWtFl7tbC4nrxBkvTezcqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708686697; c=relaxed/simple; bh=PJ7MJlglvofQ2wO9rAwrZeaFWNAwRZIw39N06nr7AhE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=rIS7kG0TtCvbG0NLwGcZlSBQdR3D11PZv/q0ElZv2KOE9b5DttK8JgS/jm0XfgU1mtHw5mxfctF/wmuyjB/5NzFkbeorWTVzabXKutP01aacZrJfEkGxU0NR6HmotLrQc2aInhissVMVbsdOfezIWbqJFPl//Wds7kcC6z0jXIA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a3e7f7b3d95so80142866b.3 for ; Fri, 23 Feb 2024 03:11:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1708686692; x=1709291492; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=InXRxv07IJOnZ04sjat+bqrdTcpHFa/O1trlDvaZaLc=; b=TqgNSVCeTPExHiIXMLAukemzV+9CfPsQh01HZ3us1UqPHkhdBew6l+H0XROBhdVtgK WPFep2rrPGjFg6oYPMc4POEoBMntJytXx5qzaIcm1sd6FHN4HvITa6oiccM1OWtPcgH7 jk11cC8WldrnijAtlwbx696oGAhAUEcU2f49TeuVEztDqogdAqRmeNBx0lT1BauZlS2I OSQ0FV/cMc7lU26foTvElpaNghU2LHUkypc8JI8TEENm470CjkdlmjfTxjl6A6SYTfLE OdthZTagL7YHPPI9Cl59MXZWmW+keJ4+IkJWELQ3djRL3pfzr6UY2uA5u0xqqwHW1g6j mcQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708686692; x=1709291492; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=InXRxv07IJOnZ04sjat+bqrdTcpHFa/O1trlDvaZaLc=; b=KB5kErRz/oou76RVWMiZ7Btkr5cMuC2m6SPDJjI1jZTxSp2x1Cw25XrxSqv0XGiMej SeFNoC5U9STkVj9dvcJMFOWBMFRe+si00RtjH9ohtJ++9bjDjDL8k0y5spBlhhkFJUqB Y9J8iG/acgDYpg21oQ72DHFzUNEETCnISVV8USSaTDDIWJNlvdzI2uTv+uG8HSwlyBSI U8s4J2A2XHx1zUE50Nk/8/yoI1Mf3zjQQ+sVpuNMOq7hBmykeeulgxqMz/PYYvSVzxfJ u0l3tvLeQBsTfu/pMcmIiflewHIraBp4leeKeueZE9F39DgiNDxjCDUMM1mrh3SRt1CH VyYQ== X-Gm-Message-State: AOJu0YxQSmYCKsD377o86iU9TbKFS2Jszq4FACSwZeClHro1s2mEhn5l QuJQ7NmGm1kjTuHjRg2Xz/CByLhKZObHiFq2emorYILNyOuoHSiBAEhPyRXWsa80I01Tvkv3jME = X-Received: by 2002:a17:906:1710:b0:a3e:f4c9:b90c with SMTP id c16-20020a170906171000b00a3ef4c9b90cmr1178417eje.64.1708686691899; Fri, 23 Feb 2024 03:11:31 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id ps2-20020a170906bf4200b00a3f20a8d2f6sm2836017ejb.112.2024.02.23.03.11.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Feb 2024 03:11:31 -0800 (PST) Message-ID: Date: Fri, 23 Feb 2024 12:11:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 1/4] x86/APX: respect {vex}/{vex3} Content-Language: en-US From: Jan Beulich To: Binutils Cc: "H.J. Lu" , Lili Cui References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: X-Spam-Status: No, score=-3025.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791687872800191270 X-GMAIL-MSGID: 1791687872800191270 Even when an EVEX encoding is available, use of such a prefix ought to be respected (resulting in an error) rather than ignored. As requested during review already, introduce a new encoding enumerator to record use of eGPR-s, and update state transitions accordingly. The optimize_encoding() change also addresses an internal assembler error that was previously raised when respective memory operands used eGPR-s for addressing. While this results in a change of diagnostic issued for VEX-encoded insns, the new one is at least no worse than the prior one. --- Question is whether for the state transitions we want to introduce a couple of helper functions: check_register() has duplicates each of what RC_SAE_specifier() and check_VecOperations() also do. --- v2: Add comments in testcase. --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -439,9 +439,6 @@ struct _i386_insn /* Prefer the REX2 prefix in encoding. */ bool rex2_encoding; - /* Need to use an Egpr capable encoding (REX2 or EVEX). */ - bool has_egpr; - /* Disable instruction size optimization. */ bool no_optimize; @@ -451,6 +448,7 @@ struct _i386_insn encoding_default = 0, encoding_vex, encoding_vex3, + encoding_egpr, /* REX2 or EVEX. */ encoding_evex, encoding_evex512, encoding_error @@ -1887,7 +1885,7 @@ static INLINE bool need_evex_encoding (c { return i.encoding == encoding_evex || i.encoding == encoding_evex512 - || (t->opcode_modifier.vex && i.has_egpr) + || (t->opcode_modifier.vex && i.encoding == encoding_egpr) || i.mask.reg; } @@ -2489,7 +2487,8 @@ static INLINE int fits_in_imm4 (offsetT num) { /* Despite the name, check for imm3 if we're dealing with EVEX. */ - return (num & (i.encoding != encoding_evex ? 0xf : 7)) == num; + return (num & (i.encoding != encoding_evex + && i.encoding != encoding_egpr ? 0xf : 7)) == num; } static i386_operand_type @@ -4837,6 +4836,7 @@ optimize_encoding (void) } } else if (i.encoding != encoding_evex + && i.encoding != encoding_egpr && !i.types[0].bitfield.zmmword && !i.types[1].bitfield.zmmword && !i.mask.reg @@ -6839,10 +6839,13 @@ md_assemble (char *line) if (optimize && !i.no_optimize && i.tm.opcode_modifier.optimize) optimize_encoding (); - /* Past optimization there's no need to distinguish encoding_evex and - encoding_evex512 anymore. */ + /* Past optimization there's no need to distinguish encoding_evex, + encoding_evex512, and encoding_egpr anymore. */ if (i.encoding == encoding_evex512) i.encoding = encoding_evex; + else if (i.encoding == encoding_egpr) + i.encoding = is_any_vex_encoding (&i.tm) ? encoding_evex + : encoding_default; if (use_unaligned_vector_move) encode_with_unaligned_vector_move (); @@ -8277,27 +8280,42 @@ VEX_check_encoding (const insn_template return 1; } - if (i.encoding == encoding_evex - || i.encoding == encoding_evex512) + switch (i.encoding) { + case encoding_default: + break; + + case encoding_vex: + case encoding_vex3: + /* This instruction must be encoded with VEX prefix. */ + if (!t->opcode_modifier.vex) + { + i.error = no_vex_encoding; + return 1; + } + break; + + case encoding_evex: + case encoding_evex512: /* This instruction must be encoded with EVEX prefix. */ if (!t->opcode_modifier.evex) { i.error = no_evex_encoding; return 1; } - return 0; - } + break; - if (!t->opcode_modifier.vex) - { - /* This instruction template doesn't have VEX prefix. */ - if (i.encoding != encoding_default) + case encoding_egpr: + /* This instruction must be encoded with REX2 or EVEX prefix. */ + if (t->opcode_modifier.vex && !t->opcode_modifier.evex) { - i.error = no_vex_encoding; + i.error = no_evex_encoding; return 1; } - return 0; + break; + + default: + abort (); } return 0; @@ -12896,6 +12914,19 @@ s_insn (int dummy ATTRIBUTE_UNUSED) if (i.encoding == encoding_evex512) i.encoding = encoding_evex; + if (i.encoding == encoding_egpr) + { + if (vex || xop) + { + as_bad (_("eGPR use conflicts with encoding specifier")); + goto done; + } + if (evex) + i.encoding = encoding_evex; + else + i.encoding = encoding_default; + } + /* Are we to emit ModR/M encoding? */ if (!i.short_form && (i.mem_operands @@ -13340,11 +13371,18 @@ RC_SAE_specifier (const char *pstr) return NULL; } - if (i.encoding == encoding_default) - i.encoding = encoding_evex512; - else if (i.encoding != encoding_evex - && i.encoding != encoding_evex512) - return NULL; + switch (i.encoding) + { + case encoding_default: + case encoding_egpr: + i.encoding = encoding_evex512; + break; + case encoding_evex: + case encoding_evex512: + break; + default: + return NULL; + } i.rounding.type = RC_NamesTable[j].type; @@ -13405,11 +13443,18 @@ check_VecOperations (char *op_string) } op_string++; - if (i.encoding == encoding_default) - i.encoding = encoding_evex; - else if (i.encoding != encoding_evex - && i.encoding != encoding_evex512) - goto unknown_vec_op; + switch (i.encoding) + { + case encoding_default: + case encoding_egpr: + i.encoding = encoding_evex; + break; + case encoding_evex: + case encoding_evex512: + break; + default: + goto unknown_vec_op; + } i.broadcast.type = bcst_type; i.broadcast.operand = this_operand; @@ -15676,11 +15721,19 @@ static bool check_register (const reg_en if (vector_size < VSZ512) return false; - if (i.encoding == encoding_default) - i.encoding = encoding_evex512; - else if (i.encoding != encoding_evex - && i.encoding != encoding_evex512) - i.encoding = encoding_error; + switch (i.encoding) + { + case encoding_default: + case encoding_egpr: + i.encoding = encoding_evex512; + break; + case encoding_evex: + case encoding_evex512: + break; + default: + i.encoding = encoding_error; + break; + } } if (vector_size < VSZ256 && r->reg_type.bitfield.ymmword) @@ -15706,11 +15759,19 @@ static bool check_register (const reg_en || flag_code != CODE_64BIT) return false; - if (i.encoding == encoding_default - || i.encoding == encoding_evex512) - i.encoding = encoding_evex; - else if (i.encoding != encoding_evex) - i.encoding = encoding_error; + switch (i.encoding) + { + case encoding_default: + case encoding_egpr: + case encoding_evex512: + i.encoding = encoding_evex; + break; + case encoding_evex: + break; + default: + i.encoding = encoding_error; + break; + } } if (r->reg_flags & RegRex2) @@ -15719,7 +15780,19 @@ static bool check_register (const reg_en || flag_code != CODE_64BIT) return false; - i.has_egpr = true; + switch (i.encoding) + { + case encoding_default: + i.encoding = encoding_egpr; + break; + case encoding_egpr: + case encoding_evex: + case encoding_evex512: + break; + default: + i.encoding = encoding_error; + break; + } } if (((r->reg_flags & (RegRex64 | RegRex)) || r->reg_type.bitfield.qword) --- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -209,11 +209,18 @@ operatorT i386_operator (const char *nam || i386_types[j].sz[0] > 8 || (i386_types[j].sz[0] & (i386_types[j].sz[0] - 1))) return O_illegal; - if (i.encoding == encoding_default) - i.encoding = encoding_evex; - else if (i.encoding != encoding_evex - && i.encoding != encoding_evex512) - return O_illegal; + switch (i.encoding) + { + case encoding_default: + case encoding_egpr: + i.encoding = encoding_evex; + break; + case encoding_evex: + case encoding_evex512: + break; + default: + return O_illegal; + } if (!i.broadcast.bytes && !i.broadcast.type) { i.broadcast.bytes = i386_types[j].sz[0]; --- a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l +++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l @@ -101,102 +101,109 @@ .*:108: Error: extended GPR cannot be used as base/index for `gf2p8affineinvqb' .*:109: Error: extended GPR cannot be used as base/index for `gf2p8affineqb' .*:110: Error: extended GPR cannot be used as base/index for `gf2p8mulb' -.*:112: Error: extended GPR cannot be used as base/index for `vaesimc' -.*:113: Error: extended GPR cannot be used as base/index for `vaeskeygenassist' -.*:114: Error: extended GPR cannot be used as base/index for `vblendpd' -.*:115: Error: extended GPR cannot be used as base/index for `vblendpd' -.*:116: Error: extended GPR cannot be used as base/index for `vblendps' -.*:117: Error: extended GPR cannot be used as base/index for `vblendps' -.*:118: Error: extended GPR cannot be used as base/index for `vblendvpd' -.*:119: Error: extended GPR cannot be used as base/index for `vblendvpd' -.*:120: Error: extended GPR cannot be used as base/index for `vblendvps' -.*:121: Error: extended GPR cannot be used as base/index for `vblendvps' -.*:122: Error: extended GPR cannot be used as base/index for `vdppd' -.*:123: Error: extended GPR cannot be used as base/index for `vdpps' -.*:124: Error: extended GPR cannot be used as base/index for `vdpps' -.*:125: Error: extended GPR cannot be used as base/index for `vhaddpd' -.*:126: Error: extended GPR cannot be used as base/index for `vhaddpd' -.*:127: Error: extended GPR cannot be used as base/index for `vhsubps' -.*:128: Error: extended GPR cannot be used as base/index for `vhsubps' -.*:129: Error: extended GPR cannot be used as base/index for `vlddqu' -.*:130: Error: extended GPR cannot be used as base/index for `vlddqu' -.*:131: Error: extended GPR cannot be used as base/index for `vldmxcsr' -.*:132: Error: extended GPR cannot be used as base/index for `vmaskmovpd' -.*:133: Error: extended GPR cannot be used as base/index for `vmaskmovpd' -.*:134: Error: extended GPR cannot be used as base/index for `vmaskmovpd' -.*:135: Error: extended GPR cannot be used as base/index for `vmaskmovpd' -.*:136: Error: extended GPR cannot be used as base/index for `vmaskmovps' -.*:137: Error: extended GPR cannot be used as base/index for `vmaskmovps' -.*:138: Error: extended GPR cannot be used as base/index for `vmaskmovps' -.*:139: Error: extended GPR cannot be used as base/index for `vmaskmovps' -.*:140: Error: register type mismatch for `vmovmskpd' -.*:141: Error: register type mismatch for `vmovmskpd' -.*:142: Error: register type mismatch for `vmovmskps' -.*:143: Error: register type mismatch for `vmovmskps' -.*:144: Error: extended GPR cannot be used as base/index for `vpblendd' -.*:145: Error: extended GPR cannot be used as base/index for `vpblendd' -.*:146: Error: extended GPR cannot be used as base/index for `vpblendvb' -.*:147: Error: extended GPR cannot be used as base/index for `vpblendvb' -.*:148: Error: extended GPR cannot be used as base/index for `vpblendw' -.*:149: Error: extended GPR cannot be used as base/index for `vpblendw' -.*:150: Error: extended GPR cannot be used as base/index for `vpcmpeqb' -.*:151: Error: extended GPR cannot be used as base/index for `vpcmpeqd' -.*:152: Error: extended GPR cannot be used as base/index for `vpcmpeqq' -.*:153: Error: extended GPR cannot be used as base/index for `vpcmpeqw' -.*:154: Error: extended GPR cannot be used as base/index for `vpcmpestri' -.*:155: Error: extended GPR cannot be used as base/index for `vpcmpestrm' -.*:156: Error: extended GPR cannot be used as base/index for `vpcmpgtb' -.*:157: Error: extended GPR cannot be used as base/index for `vpcmpgtd' -.*:158: Error: extended GPR cannot be used as base/index for `vpcmpgtq' -.*:159: Error: extended GPR cannot be used as base/index for `vpcmpgtw' -.*:160: Error: extended GPR cannot be used as base/index for `vpcmpistri' -.*:161: Error: extended GPR cannot be used as base/index for `vpcmpistrm' -.*:162: Error: extended GPR cannot be used as base/index for `vperm2f128' -.*:163: Error: extended GPR cannot be used as base/index for `vperm2i128' -.*:164: Error: extended GPR cannot be used as base/index for `vphaddd' -.*:165: Error: extended GPR cannot be used as base/index for `vphaddd' -.*:166: Error: extended GPR cannot be used as base/index for `vphaddsw' -.*:167: Error: extended GPR cannot be used as base/index for `vphaddsw' -.*:168: Error: extended GPR cannot be used as base/index for `vphaddw' -.*:169: Error: extended GPR cannot be used as base/index for `vphaddw' -.*:170: Error: extended GPR cannot be used as base/index for `vphminposuw' -.*:171: Error: extended GPR cannot be used as base/index for `vphsubd' -.*:172: Error: extended GPR cannot be used as base/index for `vphsubd' -.*:173: Error: extended GPR cannot be used as base/index for `vphsubsw' -.*:174: Error: extended GPR cannot be used as base/index for `vphsubsw' -.*:175: Error: extended GPR cannot be used as base/index for `vphsubw' -.*:176: Error: extended GPR cannot be used as base/index for `vphsubw' -.*:177: Error: extended GPR cannot be used as base/index for `vpmaskmovd' -.*:178: Error: extended GPR cannot be used as base/index for `vpmaskmovd' -.*:179: Error: extended GPR cannot be used as base/index for `vpmaskmovd' -.*:180: Error: extended GPR cannot be used as base/index for `vpmaskmovd' -.*:181: Error: extended GPR cannot be used as base/index for `vpmaskmovq' -.*:182: Error: extended GPR cannot be used as base/index for `vpmaskmovq' -.*:183: Error: extended GPR cannot be used as base/index for `vpmaskmovq' -.*:184: Error: extended GPR cannot be used as base/index for `vpmaskmovq' -.*:185: Error: register type mismatch for `vpmovmskb' -.*:186: Error: register type mismatch for `vpmovmskb' -.*:187: Error: extended GPR cannot be used as base/index for `vpsignb' -.*:188: Error: extended GPR cannot be used as base/index for `vpsignb' -.*:189: Error: extended GPR cannot be used as base/index for `vpsignd' -.*:190: Error: extended GPR cannot be used as base/index for `vpsignd' -.*:191: Error: extended GPR cannot be used as base/index for `vpsignw' -.*:192: Error: extended GPR cannot be used as base/index for `vpsignw' -.*:193: Error: extended GPR cannot be used as base/index for `vptest' -.*:194: Error: extended GPR cannot be used as base/index for `vptest' -.*:195: Error: extended GPR cannot be used as base/index for `vrcpps' -.*:196: Error: extended GPR cannot be used as base/index for `vrcpps' -.*:197: Error: extended GPR cannot be used as base/index for `vrcpss' +.*:112: Error: no EVEX encoding for `vaesimc' +.*:113: Error: no EVEX encoding for `vaeskeygenassist' +.*:114: Error: no EVEX encoding for `vblendpd' +.*:115: Error: no EVEX encoding for `vblendpd' +.*:116: Error: no EVEX encoding for `vblendps' +.*:117: Error: no EVEX encoding for `vblendps' +.*:118: Error: no EVEX encoding for `vblendvpd' +.*:119: Error: no EVEX encoding for `vblendvpd' +.*:120: Error: no EVEX encoding for `vblendvps' +.*:121: Error: no EVEX encoding for `vblendvps' +.*:122: Error: no EVEX encoding for `vdppd' +.*:123: Error: no EVEX encoding for `vdpps' +.*:124: Error: no EVEX encoding for `vdpps' +.*:125: Error: no EVEX encoding for `vhaddpd' +.*:126: Error: no EVEX encoding for `vhaddpd' +.*:127: Error: no EVEX encoding for `vhsubps' +.*:128: Error: no EVEX encoding for `vhsubps' +.*:129: Error: no EVEX encoding for `vlddqu' +.*:130: Error: no EVEX encoding for `vlddqu' +.*:131: Error: no EVEX encoding for `vldmxcsr' +.*:132: Error: no EVEX encoding for `vmaskmovpd' +.*:133: Error: no EVEX encoding for `vmaskmovpd' +.*:134: Error: no EVEX encoding for `vmaskmovpd' +.*:135: Error: no EVEX encoding for `vmaskmovpd' +.*:136: Error: no EVEX encoding for `vmaskmovps' +.*:137: Error: no EVEX encoding for `vmaskmovps' +.*:138: Error: no EVEX encoding for `vmaskmovps' +.*:139: Error: no EVEX encoding for `vmaskmovps' +.*:140: Error: no EVEX encoding for `vmovmskpd' +.*:141: Error: no EVEX encoding for `vmovmskpd' +.*:142: Error: no EVEX encoding for `vmovmskps' +.*:143: Error: no EVEX encoding for `vmovmskps' +.*:144: Error: no EVEX encoding for `vpblendd' +.*:145: Error: no EVEX encoding for `vpblendd' +.*:146: Error: no EVEX encoding for `vpblendvb' +.*:147: Error: no EVEX encoding for `vpblendvb' +.*:148: Error: no EVEX encoding for `vpblendw' +.*:149: Error: no EVEX encoding for `vpblendw' +.*:150: Error: no EVEX encoding for `vpcmpeqb' +.*:151: Error: no EVEX encoding for `vpcmpeqd' +.*:152: Error: no EVEX encoding for `vpcmpeqq' +.*:153: Error: no EVEX encoding for `vpcmpeqw' +.*:154: Error: no EVEX encoding for `vpcmpestri' +.*:155: Error: no EVEX encoding for `vpcmpestrm' +.*:156: Error: no EVEX encoding for `vpcmpgtb' +.*:157: Error: no EVEX encoding for `vpcmpgtd' +.*:158: Error: no EVEX encoding for `vpcmpgtq' +.*:159: Error: no EVEX encoding for `vpcmpgtw' +.*:160: Error: no EVEX encoding for `vpcmpistri' +.*:161: Error: no EVEX encoding for `vpcmpistrm' +.*:162: Error: no EVEX encoding for `vperm2f128' +.*:163: Error: no EVEX encoding for `vperm2i128' +.*:164: Error: no EVEX encoding for `vphaddd' +.*:165: Error: no EVEX encoding for `vphaddd' +.*:166: Error: no EVEX encoding for `vphaddsw' +.*:167: Error: no EVEX encoding for `vphaddsw' +.*:168: Error: no EVEX encoding for `vphaddw' +.*:169: Error: no EVEX encoding for `vphaddw' +.*:170: Error: no EVEX encoding for `vphminposuw' +.*:171: Error: no EVEX encoding for `vphsubd' +.*:172: Error: no EVEX encoding for `vphsubd' +.*:173: Error: no EVEX encoding for `vphsubsw' +.*:174: Error: no EVEX encoding for `vphsubsw' +.*:175: Error: no EVEX encoding for `vphsubw' +.*:176: Error: no EVEX encoding for `vphsubw' +.*:177: Error: no EVEX encoding for `vpmaskmovd' +.*:178: Error: no EVEX encoding for `vpmaskmovd' +.*:179: Error: no EVEX encoding for `vpmaskmovd' +.*:180: Error: no EVEX encoding for `vpmaskmovd' +.*:181: Error: no EVEX encoding for `vpmaskmovq' +.*:182: Error: no EVEX encoding for `vpmaskmovq' +.*:183: Error: no EVEX encoding for `vpmaskmovq' +.*:184: Error: no EVEX encoding for `vpmaskmovq' +.*:185: Error: no EVEX encoding for `vpmovmskb' +.*:186: Error: no EVEX encoding for `vpmovmskb' +.*:187: Error: no EVEX encoding for `vpsignb' +.*:188: Error: no EVEX encoding for `vpsignb' +.*:189: Error: no EVEX encoding for `vpsignd' +.*:190: Error: no EVEX encoding for `vpsignd' +.*:191: Error: no EVEX encoding for `vpsignw' +.*:192: Error: no EVEX encoding for `vpsignw' +.*:193: Error: no EVEX encoding for `vptest' +.*:194: Error: no EVEX encoding for `vptest' +.*:195: Error: no EVEX encoding for `vrcpps' +.*:196: Error: no EVEX encoding for `vrcpps' +.*:197: Error: no EVEX encoding for `vrcpss' .*:198: Error: .* 4 bits for `vroundpd' .*:199: Error: .* 4 bits for `vroundps' .*:200: Error: .* 4 bits for `vroundsd' .*:201: Error: .* 4 bits for `vroundss' -.*:202: Error: extended GPR cannot be used as base/index for `vrsqrtps' -.*:203: Error: extended GPR cannot be used as base/index for `vrsqrtps' -.*:204: Error: extended GPR cannot be used as base/index for `vrsqrtss' -.*:205: Error: extended GPR cannot be used as base/index for `vstmxcsr' -.*:206: Error: extended GPR cannot be used as base/index for `vtestpd' -.*:207: Error: extended GPR cannot be used as base/index for `vtestpd' -.*:208: Error: extended GPR cannot be used as base/index for `vtestps' -.*:209: Error: extended GPR cannot be used as base/index for `vtestps' +.*:202: Error: no EVEX encoding for `vrsqrtps' +.*:203: Error: no EVEX encoding for `vrsqrtps' +.*:204: Error: no EVEX encoding for `vrsqrtss' +.*:205: Error: no EVEX encoding for `vstmxcsr' +.*:206: Error: no EVEX encoding for `vtestpd' +.*:207: Error: no EVEX encoding for `vtestpd' +.*:208: Error: no EVEX encoding for `vtestps' +.*:209: Error: no EVEX encoding for `vtestps' +.*:211: Error: no VEX/XOP encoding for `and' +.*:212: Error: no VEX/XOP encoding for `and' +.*:213: Error: .* `and' +.*:214: Error: no VEX/XOP encoding for `and' +.*:215: Error: no VEX/XOP encoding for `and' +.*:216: Error: .* `and' +.*:219: Error: .* `andn' #pass --- a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s +++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s @@ -207,3 +207,13 @@ vtestpd (%r27),%ymm6 vtestps (%r27),%xmm6 vtestps (%r27),%ymm6 +# {vex} + {vex} and %eax, %eax + {vex} and %r8, %r8 + {vex} and %r16, %r16 + {vex} and %eax, %eax, %eax + {vex} and %r8, %r8, %r8 + {vex} and %r16, %r16, %r16 + {vex} andn %eax, %eax, %eax # This one's valid. + {vex} andn %r8, %r8, %r8 # And this. + {vex} andn %r16, %r16, %r16