From patchwork Fri May 17 10:48:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 90367 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D09CB384AB72 for ; Fri, 17 May 2024 10:48:41 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 3B4253858D20 for ; Fri, 17 May 2024 10:48:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3B4253858D20 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 3B4253858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715942893; cv=none; b=k7hOA6cCocAlfRi1s4xL7YoEKXW7vwxiwf7DpEPDj2OdfYEj20q/l7+AEdAwZ7FOuTuzx6cwL9N50gYBEj1QuJq9qKFiAKQS3IrUsVz8bCf1PeZCQvtzeOjeHX/e2qZbsCWMJM5c3qaWzIsK+8BKIdkM7MAQwiP1a1P0Ra+jvLQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715942893; c=relaxed/simple; bh=ooGuV3aTIQYfN5aplwwJyi0MHjTm1dPWzbYOq5rN2Vc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=O8lQM0vctIuulq7ZVIQZROkOqnAXpVabkf3QzjS3uIhRQ4tlHWi89SBkkxde5AR3IknRLcVdpUn5j3eyUYtFlqPR7eQcyznPJG6kwIZXrKx1UOkTZQRGxmU06UBZTxX9RRUrX4nQMHUe3PSAaivcszVp1w9XVfjGXgLSxw30t3Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-572669fd9f9so4794194a12.0 for ; Fri, 17 May 2024 03:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715942890; x=1716547690; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=0Ez4pdrjnvnZHgeBqzIDjjAS/AhwganxZ4702HqVGMQ=; b=TKJWPIshZN39/v2qDZQ5eJKbkVfJvbNyLo8sWbtl3eVMlKYkGXzJeHGJD4AypeeC+N VEH5zW/2j7iz3EtOLre2TirCFp8asWEESyzeaNG0gGsQgvPZxPZPu7kO/az/OBEYl9Rg 0wNO9mA1K9+TlhgInn+sjzNR0RL6jAdJbWDgqvEs+xEQqzCOCMYQesgPnqbOzuRYpvNT 07Oem/j0X4k/p7jWdLHJPJVF5DHjPd/372Ql40fJAwdoCk3Xkzou6z3Q8j7ipBt4uayR M92eTF1EN818Ki5BCGB8OxBvbIenfoKuOG1zfEw3EnPXX6CLpu4/wtP9l7Qnp45dW5r2 q4Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715942890; x=1716547690; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0Ez4pdrjnvnZHgeBqzIDjjAS/AhwganxZ4702HqVGMQ=; b=FhcLCTR0ITUjqdgj4kFMJwMVgsiTtRPVnmXsujCp0ft0uOiDEWIALaV9z2E6/hR0ua f9op4Phkq63Yz3PhcXebrRiCbedncvDdAR49R3Yn1FC2vW+FrEFQvOT1MvW03HNGEmBI NlUSTygi6vi1JxP4V0pxr9/p3vkOUKNU5sfwJV5QKJQ8W03njkTLxqx85OfLek7axf2y atGnSiBmAuSpUvI2XiKAAe1JqxJZMvbVYCzkSG2DHJ4iVgQ97wJnqZ0gQm5XGmFwUpWu GVuiqk7As2xlxS0ESf2of92j6fcYfwhezLVFMRIIbOx6tWogSotSnCx1fbUeC7NCXoGs F16Q== X-Gm-Message-State: AOJu0Yw49jaNaBUUvZjoJkfcIGdRl01uMbYDojd2Yux8TaqNdsr9Dyme k7/MjieliuB8E8TMuGd+JjBizha2zQcFv1dm9K7/5heI0WzD49gkKVxC/xaOj4ju32FNosYBpbo = X-Google-Smtp-Source: AGHT+IE7f1STo3qnky2BZG4h4tXP35bIPDwyVJOGebDPBfpnCogCqzQtAT1U9vmpR+1T7tfBhyCtAQ== X-Received: by 2002:a17:907:6d02:b0:a5d:d35:7228 with SMTP id a640c23a62f3a-a5d0d3572c4mr82734266b.30.1715942889967; Fri, 17 May 2024 03:48:09 -0700 (PDT) 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 a640c23a62f3a-a5d0edb7922sm51066566b.94.2024.05.17.03.48.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 May 2024 03:48:09 -0700 (PDT) Message-ID: <3f5f4eb7-d448-4bf5-aa35-bf93cc9ca180@suse.com> Date: Fri, 17 May 2024 12:48:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 1/2] x86/Intel: SHLD/SHRD have dual meaning From: Jan Beulich To: Binutils Cc: "H.J. Lu" References: Content-Language: en-US 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=-3024.9 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 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+patchwork=sourceware.org@sourceware.org Since we uniformly permit D suffixes in Intel mode whenever in AT&T mode an L suffix may be used, we need to be consistent with this. Take the easy route, despite that still leading to an anomaly which is also visible from the new testcase: shld eax, ecx, 1 shld eax, ecx, cl can mean two things with APX: SHL with a D suffix in NDD EVEX encoding, or the traditional SHLD in legacy encoding. --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5392,7 +5392,7 @@ static void init_globals (void) } /* Helper for md_assemble() to decide whether to prepare for a possible 2nd - parsing pass. Instead of introducing a rarely use new insn attribute this + parsing pass. Instead of introducing a rarely used new insn attribute this utilizes a common pattern between affected templates. It is deemed acceptable that this will lead to unnecessary pass 2 preparations in a limited set of cases. */ @@ -5404,7 +5404,10 @@ static INLINE bool may_need_pass2 (const : (t->opcode_space == SPACE_0F && (t->base_opcode | 1) == 0xbf) || (t->opcode_space == SPACE_BASE - && t->base_opcode == 0x63); + && t->base_opcode == 0x63) + || (intel_syntax /* shld / shrd may mean suffixed shl / shr. */ + && t->opcode_space == SPACE_EVEXMAP4 + && (t->base_opcode | 8) == 0x2c); } #if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) --- /dev/null +++ b/gas/testsuite/gas/i386/intel-suffix.d @@ -0,0 +1,34 @@ +#objdump: -dw +#name: Intel syntax w/ suffixes + +.*: +file format .* + +Disassembly of section \.text: +0+0 <.*>: +[ ]*[a-f0-9]+: 0f a4 c8 01[ ]+shld \$0x1,%ecx,%eax +[ ]*[a-f0-9]+: 0f a5 c8[ ]+shld %cl,%ecx,%eax +[ ]*[a-f0-9]+: d1 e1[ ]+shl \$1,%ecx +[ ]*[a-f0-9]+: d3 e1[ ]+shl %cl,%ecx +[ ]*[a-f0-9]+: 62 f4 7c 18 d1 e1[ ]+shl \$1,%ecx,%eax +[ ]*[a-f0-9]+: 62 f4 7c 18 d3 e1[ ]+shl %cl,%ecx,%eax +[ ]*[a-f0-9]+: d1 e1[ ]+shl \$1,%ecx +[ ]*[a-f0-9]+: d3 e1[ ]+shl %cl,%ecx +[ ]*[a-f0-9]+: 62 f4 7c 18 d1 c1[ ]+rol \$1,%ecx,%eax +[ ]*[a-f0-9]+: 62 f4 7c 18 d3 c1[ ]+rol %cl,%ecx,%eax +[ ]*[a-f0-9]+: d1 c1[ ]+rol \$1,%ecx +[ ]*[a-f0-9]+: d3 c1[ ]+rol %cl,%ecx + +0+[0-9a-f]+ <.*>: +[ ]*[a-f0-9]+: 0f ac c8 01[ ]+shrd \$0x1,%ecx,%eax +[ ]*[a-f0-9]+: 0f ad c8[ ]+shrd %cl,%ecx,%eax +[ ]*[a-f0-9]+: d1 e9[ ]+shr \$1,%ecx +[ ]*[a-f0-9]+: d3 e9[ ]+shr %cl,%ecx +[ ]*[a-f0-9]+: 62 f4 7c 18 d1 f9[ ]+sar \$1,%ecx,%eax +[ ]*[a-f0-9]+: 62 f4 7c 18 d3 f9[ ]+sar %cl,%ecx,%eax +[ ]*[a-f0-9]+: d1 f9[ ]+sar \$1,%ecx +[ ]*[a-f0-9]+: d3 f9[ ]+sar %cl,%ecx +[ ]*[a-f0-9]+: 62 f4 7c 18 d1 c9[ ]+ror \$1,%ecx,%eax +[ ]*[a-f0-9]+: 62 f4 7c 18 d3 c9[ ]+ror %cl,%ecx,%eax +[ ]*[a-f0-9]+: d1 c9[ ]+ror \$1,%ecx +[ ]*[a-f0-9]+: d3 c9[ ]+ror %cl,%ecx +#pass --- /dev/null +++ b/gas/testsuite/gas/i386/intel-suffix.s @@ -0,0 +1,39 @@ + .intel_syntax noprefix + .text +left: + shld eax, ecx, 1 + shld eax, ecx, cl + + shld ecx, 1 + shld ecx, cl + + sald eax, ecx, 1 + sald eax, ecx, cl + + sald ecx, 1 + sald ecx, cl + + rold eax, ecx, 1 + rold eax, ecx, cl + + rold ecx, 1 + rold ecx, cl + +right: + shrd eax, ecx, 1 + shrd eax, ecx, cl + + shrd ecx, 1 + shrd ecx, cl + + sard eax, ecx, 1 + sard eax, ecx, cl + + sard ecx, 1 + sard ecx, cl + + rord eax, ecx, 1 + rord eax, ecx, cl + + rord ecx, 1 + rord ecx, cl --- a/gas/testsuite/gas/i386/x86-64.exp +++ b/gas/testsuite/gas/i386/x86-64.exp @@ -160,6 +160,7 @@ run_dump_test "x86-64-disp-intel" run_list_test "disp-imm-64" run_dump_test "intel-movs64" run_dump_test "intel-cmps64" +run_dump_test "intel-suffix" run_dump_test "x86-64-disp32" run_dump_test "rexw" run_list_test "x86-64-specific-reg" From patchwork Fri May 17 10:48:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 90368 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E150384AB65 for ; Fri, 17 May 2024 10:49:45 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 04F23384AB6A for ; Fri, 17 May 2024 10:49:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 04F23384AB6A 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 04F23384AB6A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715942948; cv=none; b=fHZw7guy6RKCo4OuUss80NJtnrYiBhVvRlq0fs0dD1OJxj8fmf7RsqqWZCCMh/gUxss+QijsDQePEL1KQAlndY+wOKqWDR/KHUN+m9VcMgefwApOYgYdw2RSWb94F7mIMexHCgKq1iWPsPYULgb/yxgb2ZcGyGFP6cQGVamHCj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715942948; c=relaxed/simple; bh=cEhHWgn/Wej1vnA8TF+8gLQ6Q6rYV8EtjL55DUDTugI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=NQKw+xsx/EcHvcuCXpMRY56fv+Hv0fsrZWhyNDvc1gOkeJKCZ7GbNwRkuxZ26qVdnq6yVq8Z2ZoNi2bad+n401jgtL8Z+9zjwUqGZQ/gCtI9KyfM+z2Rjgh4O3btVlDIVTyvZqrbGekAJmmWKgGTtBJKxsEfYaT/aTVbYsu0Jds= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-51fdc9af005so935869e87.3 for ; Fri, 17 May 2024 03:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715942940; x=1716547740; 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=HRc+uQ0VPck6WwLir9icRe/iqlxKS4O2QEUnIOXgWrA=; b=Ni2MzpAfUTak1k8fSAa/TMAbwpl4yvmwwcGgCK7T8oo/z03ct5NN7O/4N+FhfyU0qH lcqKoYnY26z8Jhip+MdjBJ2y1AaQl4ssdojNBtuw6bdynDSgM0ZxfRb0l5mLzif0/vGc cgkyWMOfhYr7dfdQI3DE6IJQ65Xpz0OUL8pClYV+o+flhu2fDbmwK69+1xOFi8D3u0o2 O8uOXuL6ReyhCk/XroBXVnV9l1G2dvNhE2CtdqhmCutg2IJJUTdBQGit8HI7+0mu85Vn Xn0KrCKrXo9BJfu3uPQsUn4vTf0oLgnvtcNW0zEC3Zl87mDTvYQVX2CE61ZjcT/qBLTb 5Pqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715942940; x=1716547740; 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=HRc+uQ0VPck6WwLir9icRe/iqlxKS4O2QEUnIOXgWrA=; b=kRe+lME7MI2Qz7rHADPc+au9oOuSBKpEPB3zOIvZkFBvC9EZa3HjprIEeuBeR/pjYk ZOjmikdyORrDiKy5ix5iFkkyuJMAQgK3Kv+SYuKymZd6s3y4esljvgnXvkLLxx/vmjJ0 Az6J2XcUdR7bXUPwCqmcp3Tpu6FctLod5W/H+psJGwqWghrKW7y4hA20O/psHtArgByR LwW9x1npf3HxKlnSTPO7ll0eVjxBaiNT9E+wMzAl3eK+Q7cKaKy08JeRqUQbP0hMqok9 Fo1GZZbCvD+kTS1kSzsNRbxB224QqQzTbMvY/GR+aMcDuWHS+6QctVO7tYoYbZ8BWXSl eX+Q== X-Gm-Message-State: AOJu0Yzj2p0VZLTf/LXEbf1avjB+6rqRZqYJx37cG1k13PGZjroBnnnm W/VbC3P4HDdaOgThTyU8mEHEkucGxudF+zDZL+0JTdH6s8X915iTaUw7fYKODgie26ROuV4o5eM = X-Google-Smtp-Source: AGHT+IH+IMl4OoD+6EMFKCWVaYyc+vLCYYpECHJrOqRTf6Zzo0e6YmxWBrkgGlzSlW7uMINzX4FLPQ== X-Received: by 2002:ac2:4181:0:b0:51f:36ed:ee43 with SMTP id 2adb3069b0e04-5220fe797bcmr15911426e87.31.1715942940279; Fri, 17 May 2024 03:49:00 -0700 (PDT) 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 a640c23a62f3a-a5d0edb7922sm51066566b.94.2024.05.17.03.48.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 May 2024 03:48:59 -0700 (PDT) Message-ID: <907d986d-256d-439e-b5cd-a00c2656df09@suse.com> Date: Fri, 17 May 2024 12:48:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 2/2] x86/Intel: warn about undue mnemonic suffixes Content-Language: en-US From: Jan Beulich To: Binutils Cc: "H.J. Lu" 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=-3024.9 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 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+patchwork=sourceware.org@sourceware.org Except for very few insns mnemonic suffixes aren't permitted in Intel syntax. Warn about such for now, indicating that they will be outright refused down the road. While fiddling with testcases to address fallout, drop a few things which should never have been tested as valid Intel syntax. Also add a previously missing line to simd-suffix.d. --- IN/OUT without explicit accumulator operand isn't really Intel syntax. Yet them not being respectively marked means they might be used that way, hence why they gain IntelSuffix nevertheless. Otoh LCALL/LJMP/LRET, while also not marked as AT&T-only, aren't amended, for such mnemonics not existing at all in Intel syntax world. Same for string insns with S coming first rather than last, albeit here also again extending to the not-really-Intel forms with an explicit accumulator operand. The Intel64 form of CALL is questionable: It allows for only a single operand size, and hence no suffix is needed there. Yet permitting a Q one might be desirable to match the Amd64 form. JMP and J continue to be inconsistent with CALL, in not permitting any suffixes, despite an operand size override having similar effects there. With NoSuf it makes little sense to add IntelSuffix there. Why is it that XSAVE{C,S} and XRSTORS don't permit suffixes, when {F,}XSAVE, XSAVEOPT, and {F,}XRSTOR do? The mnemonics ending in "64" are surely farther away from the SDM. --- v2: New. --- a/gas/NEWS +++ b/gas/NEWS @@ -1,5 +1,8 @@ -*- text -*- +* In x86 Intel syntax undue mnemonic suffixes are now warned about. This is + a first step towards rejecting their use where unjustified. + * Assembler macros can now use the syntax \+ to access the number of times a given macro has been executed. This is similar to the already existing \@ syntax, except that the count is maintained on a per-macro basis. --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9200,6 +9200,19 @@ match_template (char mnem_suffix) affect assembly of the next line of code. */ as_warn (_("stand-alone `%s' prefix"), insn_name (t)); } + + if (intel_syntax && mnem_suffix && !t->opcode_modifier.intelsuffix) + { + static bool noticed; + + as_warn (_("mnemonic suffix used with `%s'"), insn_name (t)); + if (!noticed) + { + noticed = true; + as_warn (_( +"NOTE: Such forms are deprecated and will be rejected by a future version of the assembler")); + } + } } /* Copy the template we found. */ --- a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d +++ b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d @@ -29,13 +29,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +[0-9a-fx]+ <.*> [0-9a-f]+ <.*>: [ ]*[a-f0-9]+: ff d0 call \*%rax -[ ]*[a-f0-9]+: ff d0 call \*%rax -[ ]*[a-f0-9]+: 66 ff d0 data16 call \*%rax [ ]*[a-f0-9]+: 66 ff d0 data16 call \*%rax [ ]*[a-f0-9]+: 66 ff 10 data16 call \*\(%rax\) [ ]*[a-f0-9]+: ff e0 jmp \*%rax -[ ]*[a-f0-9]+: ff e0 jmp \*%rax -[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax [ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax [ ]*[a-f0-9]+: 66 ff 20 data16 jmp \*\(%rax\) [ ]*[a-f0-9]+: e8 00 00 00 00 call [0-9a-fx]* <.*> [0-9a-f]*: R_X86_64_PC32 \*ABS\*\+0x10003c --- a/gas/testsuite/gas/i386/intel.d +++ b/gas/testsuite/gas/i386/intel.d @@ -201,8 +201,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c9 [ ]*leave [ ]*[a-f0-9]+: ca 90 90 [ ]*lret \$0x9090 [ ]*[a-f0-9]+: cb [ ]*lret -[ ]*[a-f0-9]+: ca 90 90 [ ]*lret \$0x9090 -[ ]*[a-f0-9]+: cb [ ]*lret [ ]*[a-f0-9]+: cc [ ]*int3 [ ]*[a-f0-9]+: cd 90 [ ]*int \$0x90 [ ]*[a-f0-9]+: ce [ ]*into @@ -222,18 +220,18 @@ Disassembly of section .text: [ ]*[a-f0-9]+: dd 90 90 90 90 90 [ ]*fstl -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: de 90 90 90 90 90 [ ]*ficoms -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: df 90 90 90 90 90 [ ]*fists -0x6f6f6f70\(%eax\) -[ ]*[a-f0-9]+: e0 90 [ ]*loopne (0x)?260.* -[ ]*[a-f0-9]+: e1 90 [ ]*loope (0x)?262.* -[ ]*[a-f0-9]+: e2 90 [ ]*loop (0x)?264.* -[ ]*[a-f0-9]+: e3 90 [ ]*jecxz (0x)?266.* +[ ]*[a-f0-9]+: e0 90 [ ]*loopne .* +[ ]*[a-f0-9]+: e1 90 [ ]*loope .* +[ ]*[a-f0-9]+: e2 90 [ ]*loop .* +[ ]*[a-f0-9]+: e3 90 [ ]*jecxz .* [ ]*[a-f0-9]+: e4 90 [ ]*in \$0x90,%al [ ]*[a-f0-9]+: e5 90 [ ]*in \$0x90,%eax [ ]*[a-f0-9]+: e6 90 [ ]*out %al,\$0x90 [ ]*[a-f0-9]+: e7 90 [ ]*out %eax,\$0x90 -[ ]*[a-f0-9]+: e8 90 90 90 90 [ ]*call (0x)?90909373.* -[ ]*[a-f0-9]+: e9 90 90 90 90 [ ]*jmp (0x)?90909378.* +[ ]*[a-f0-9]+: e8 90 90 90 90 [ ]*call .* +[ ]*[a-f0-9]+: e9 90 90 90 90 [ ]*jmp .* [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 [ ]*ljmp \$0x9090,\$0x90909090 -[ ]*[a-f0-9]+: eb 90 [ ]*jmp (0x)?281.* +[ ]*[a-f0-9]+: eb 90 [ ]*jmp .* [ ]*[a-f0-9]+: ec [ ]*in \(%dx\),%al [ ]*[a-f0-9]+: ed [ ]*in \(%dx\),%eax [ ]*[a-f0-9]+: ee [ ]*out %al,\(%dx\) @@ -306,22 +304,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 77 [ ]*emms [ ]*[a-f0-9]+: 0f 7e 90 90 90 90 90 [ ]*movd %mm2,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 0f 7f 90 90 90 90 90 [ ]*movq %mm2,-0x6f6f6f70\(%eax\) -[ ]*[a-f0-9]+: 0f 80 90 90 90 90 [ ]*jo (0x)?909094e6.* -[ ]*[a-f0-9]+: 0f 81 90 90 90 90 [ ]*jno (0x)?909094ec.* -[ ]*[a-f0-9]+: 0f 82 90 90 90 90 [ ]*jb (0x)?909094f2.* -[ ]*[a-f0-9]+: 0f 83 90 90 90 90 [ ]*jae (0x)?909094f8.* -[ ]*[a-f0-9]+: 0f 84 90 90 90 90 [ ]*je (0x)?909094fe.* -[ ]*[a-f0-9]+: 0f 85 90 90 90 90 [ ]*jne (0x)?90909504.* -[ ]*[a-f0-9]+: 0f 86 90 90 90 90 [ ]*jbe (0x)?9090950a.* -[ ]*[a-f0-9]+: 0f 87 90 90 90 90 [ ]*ja (0x)?90909510.* -[ ]*[a-f0-9]+: 0f 88 90 90 90 90 [ ]*js (0x)?90909516.* -[ ]*[a-f0-9]+: 0f 89 90 90 90 90 [ ]*jns (0x)?9090951c.* -[ ]*[a-f0-9]+: 0f 8a 90 90 90 90 [ ]*jp (0x)?90909522.* -[ ]*[a-f0-9]+: 0f 8b 90 90 90 90 [ ]*jnp (0x)?90909528.* -[ ]*[a-f0-9]+: 0f 8c 90 90 90 90 [ ]*jl (0x)?9090952e.* -[ ]*[a-f0-9]+: 0f 8d 90 90 90 90 [ ]*jge (0x)?90909534.* -[ ]*[a-f0-9]+: 0f 8e 90 90 90 90 [ ]*jle (0x)?9090953a.* -[ ]*[a-f0-9]+: 0f 8f 90 90 90 90 [ ]*jg (0x)?90909540.* +[ ]*[a-f0-9]+: 0f 80 90 90 90 90 [ ]*jo .* +[ ]*[a-f0-9]+: 0f 81 90 90 90 90 [ ]*jno .* +[ ]*[a-f0-9]+: 0f 82 90 90 90 90 [ ]*jb .* +[ ]*[a-f0-9]+: 0f 83 90 90 90 90 [ ]*jae .* +[ ]*[a-f0-9]+: 0f 84 90 90 90 90 [ ]*je .* +[ ]*[a-f0-9]+: 0f 85 90 90 90 90 [ ]*jne .* +[ ]*[a-f0-9]+: 0f 86 90 90 90 90 [ ]*jbe .* +[ ]*[a-f0-9]+: 0f 87 90 90 90 90 [ ]*ja .* +[ ]*[a-f0-9]+: 0f 88 90 90 90 90 [ ]*js .* +[ ]*[a-f0-9]+: 0f 89 90 90 90 90 [ ]*jns .* +[ ]*[a-f0-9]+: 0f 8a 90 90 90 90 [ ]*jp .* +[ ]*[a-f0-9]+: 0f 8b 90 90 90 90 [ ]*jnp .* +[ ]*[a-f0-9]+: 0f 8c 90 90 90 90 [ ]*jl .* +[ ]*[a-f0-9]+: 0f 8d 90 90 90 90 [ ]*jge .* +[ ]*[a-f0-9]+: 0f 8e 90 90 90 90 [ ]*jle .* +[ ]*[a-f0-9]+: 0f 8f 90 90 90 90 [ ]*jg .* [ ]*[a-f0-9]+: 0f 90 80 90 90 90 90 [ ]*seto -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 0f 91 80 90 90 90 90 [ ]*setno -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 0f 92 80 90 90 90 90 [ ]*setb -0x6f6f6f70\(%eax\) @@ -523,14 +521,12 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 c9 [ ]*leavew [ ]*[a-f0-9]+: 66 ca 90 90 [ ]*lretw \$0x9090 [ ]*[a-f0-9]+: 66 cb [ ]*lretw -[ ]*[a-f0-9]+: 66 ca 90 90 [ ]*lretw \$0x9090 -[ ]*[a-f0-9]+: 66 cb [ ]*lretw [ ]*[a-f0-9]+: 66 cf [ ]*iretw [ ]*[a-f0-9]+: 66 d1 90 90 90 90 90 [ ]*rclw \$1,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 66 d3 90 90 90 90 90 [ ]*rclw %cl,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 66 e5 90 [ ]*in \$0x90,%ax [ ]*[a-f0-9]+: 66 e7 90 [ ]*out %ax,\$0x90 -[ ]*[a-f0-9]+: 66 e8 8f 90 [ ]*callw (0x)?9922.* +[ ]*[a-f0-9]+: 66 e8 8f 90 [ ]*callw .* [ ]*[a-f0-9]+: 66 ea 90 90 90 90 [ ]*ljmpw \$0x9090,\$0x9090 [ ]*[a-f0-9]+: 66 ed [ ]*in \(%dx\),%ax [ ]*[a-f0-9]+: 66 ef [ ]*out %ax,\(%dx\) @@ -584,15 +580,15 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c3 [ ]*ret [a-f0-9]+ : -[ ]*[a-f0-9]+: e8 f9 ff ff ff [ ]*call 9d9 -[ ]*[a-f0-9]+: e8 f5 ff ff ff [ ]*call 9da +[ ]*[a-f0-9]+: e8 f9 ff ff ff [ ]*call .* +[ ]*[a-f0-9]+: e8 f5 ff ff ff [ ]*call .* [ ]*[a-f0-9]+: dd 1c d0 [ ]*fstpl \(%eax,%edx,8\) [ ]*[a-f0-9]+: b9 00 00 00 00 [ ]*mov \$0x0,%ecx [ ]*[a-f0-9]+: 88 04 16 [ ]*mov %al,\(%esi,%edx,1\) [ ]*[a-f0-9]+: 88 04 32 [ ]*mov %al,\(%edx,%esi,1\) [ ]*[a-f0-9]+: 88 04 56 [ ]*mov %al,\(%esi,%edx,2\) [ ]*[a-f0-9]+: 88 04 56 [ ]*mov %al,\(%esi,%edx,2\) -[ ]*[a-f0-9]+: eb 0c [ ]*jmp a07 +[ ]*[a-f0-9]+: eb 0c [ ]*jmp .* [ ]*[a-f0-9]+: 6c [ ]*insb \(%dx\),%es:\(%edi\) [ ]*[a-f0-9]+: 66 0f c1 90 90 90 90 90 [ ]*xadd %dx,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 83 e0 f8 [ ]*and \$0xfffffff8,%eax @@ -608,8 +604,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 2f [ ]*das [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 [ ]*ljmp \$0x9090,\$0x90909090 [ ]*[a-f0-9]+: 66 a5 [ ]*movsw %ds:\(%esi\),%es:\(%edi\) -[ ]*[a-f0-9]+: 70 90 [ ]*jo 9be -[ ]*[a-f0-9]+: 75 fe [ ]*jne a2e +[ ]*[a-f0-9]+: 70 90 [ ]*jo .* +[ ]*[a-f0-9]+: 75 fe [ ]*jne .* [ ]*[a-f0-9]+: 0f 6f 35 28 00 00 00 [ ]*movq 0x28,%mm6 [ ]*[a-f0-9]+: 03 3c c3 [ ]*add \(%ebx,%eax,8\),%edi [ ]*[a-f0-9]+: 0f 6e 44 c3 04 [ ]*movd 0x4\(%ebx,%eax,8\),%mm0 @@ -622,8 +618,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 8b 84 43 00 40 00 00 [ ]*mov 0x4000\(%ebx,%eax,2\),%ax [ ]*[a-f0-9]+: ff e0 [ ]*jmp \*%eax [ ]*[a-f0-9]+: ff 20 [ ]*jmp \*\(%eax\) -[ ]*[a-f0-9]+: ff 25 db 09 00 00 [ ]*jmp \*0x9db -[ ]*[a-f0-9]+: e9 5b ff ff ff [ ]*jmp 9db +[ ]*[a-f0-9]+: ff 25 .. .. 00 00 [ ]*jmp \*.* +[ ]*[a-f0-9]+: e9 5b ff ff ff [ ]*jmp .* [ ]*[a-f0-9]+: b8 12 00 00 00 [ ]*mov \$0x12,%eax [ ]*[a-f0-9]+: 25 ff ff fb ff [ ]*and \$0xfffbffff,%eax [ ]*[a-f0-9]+: 25 ff ff fb ff [ ]*and \$0xfffbffff,%eax --- a/gas/testsuite/gas/i386/intel.s +++ b/gas/testsuite/gas/i386/intel.s @@ -195,8 +195,6 @@ foo: leave retf 0x9090 retf - lret 0x9090 - lret int3 int 0x90 into @@ -517,8 +515,6 @@ foo: leavew retfw 0x9090 retfw - lretw 0x9090 - lretw iretw rcl word ptr 0x90909090[eax] rcl word ptr 0x90909090[eax], cl --- a/gas/testsuite/gas/i386/intel-intel.d +++ b/gas/testsuite/gas/i386/intel-intel.d @@ -202,8 +202,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c9 + leave [ ]*[a-f0-9]+: ca 90 90 + retf 0x9090 [ ]*[a-f0-9]+: cb + retf -[ ]*[a-f0-9]+: ca 90 90 + retf 0x9090 -[ ]*[a-f0-9]+: cb + retf [ ]*[a-f0-9]+: cc + int3 [ ]*[a-f0-9]+: cd 90 + int 0x90 [ ]*[a-f0-9]+: ce + into @@ -223,10 +221,10 @@ Disassembly of section .text: [ ]*[a-f0-9]+: dd 90 90 90 90 90 + fst QWORD PTR \[eax-0x6f6f6f70\] [ ]*[a-f0-9]+: de 90 90 90 90 90 + ficom WORD PTR \[eax-0x6f6f6f70\] [ ]*[a-f0-9]+: df 90 90 90 90 90 + fist WORD PTR \[eax-0x6f6f6f70\] -[ ]*[a-f0-9]+: e0 90 + loopne 260 -[ ]*[a-f0-9]+: e1 90 + loope 262 -[ ]*[a-f0-9]+: e2 90 + loop 264 -[ ]*[a-f0-9]+: e3 90 + jecxz 266 +[ ]*[a-f0-9]+: e0 90 + loopne .* +[ ]*[a-f0-9]+: e1 90 + loope .* +[ ]*[a-f0-9]+: e2 90 + loop .* +[ ]*[a-f0-9]+: e3 90 + jecxz .* [ ]*[a-f0-9]+: e4 90 + in al,0x90 [ ]*[a-f0-9]+: e5 90 + in eax,0x90 [ ]*[a-f0-9]+: e6 90 + out 0x90,al @@ -234,7 +232,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: e8 90 90 90 90 + call 90909... [ ]*[a-f0-9]+: e9 90 90 90 90 + jmp 90909... [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 jmp 0x9090:0x90909090 -[ ]*[a-f0-9]+: eb 90 + jmp 281 +[ ]*[a-f0-9]+: eb 90 + jmp .* [ ]*[a-f0-9]+: ec + in al,dx [ ]*[a-f0-9]+: ed + in eax,dx [ ]*[a-f0-9]+: ee + out dx,al @@ -524,8 +522,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 c9 + leavew [ ]*[a-f0-9]+: 66 ca 90 90 + retfw 0x9090 [ ]*[a-f0-9]+: 66 cb + retfw -[ ]*[a-f0-9]+: 66 ca 90 90 + retfw 0x9090 -[ ]*[a-f0-9]+: 66 cb + retfw [ ]*[a-f0-9]+: 66 cf + iretw [ ]*[a-f0-9]+: 66 d1 90 90 90 90 90 rcl WORD PTR \[eax-0x6f6f6f70\],1 [ ]*[a-f0-9]+: 66 d3 90 90 90 90 90 rcl WORD PTR \[eax-0x6f6f6f70\],cl @@ -585,15 +581,15 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c3 + ret [a-f0-9]+ : -[ ]*[a-f0-9]+: e8 f9 ff ff ff + call 9d9 -[ ]*[a-f0-9]+: e8 f5 ff ff ff + call 9da +[ ]*[a-f0-9]+: e8 f9 ff ff ff + call .* +[ ]*[a-f0-9]+: e8 f5 ff ff ff + call .* [ ]*[a-f0-9]+: dd 1c d0 + fstp QWORD PTR \[eax\+edx\*8\] [ ]*[a-f0-9]+: b9 00 00 00 00 + mov ecx,0x0 [ ]*[a-f0-9]+: 88 04 16 + mov BYTE PTR \[esi\+edx\*1\],al [ ]*[a-f0-9]+: 88 04 32 + mov BYTE PTR \[edx\+esi\*1\],al [ ]*[a-f0-9]+: 88 04 56 + mov BYTE PTR \[esi\+edx\*2\],al [ ]*[a-f0-9]+: 88 04 56 + mov BYTE PTR \[esi\+edx\*2\],al -[ ]*[a-f0-9]+: eb 0c + jmp a07 +[ ]*[a-f0-9]+: eb 0c + jmp .* [ ]*[a-f0-9]+: 6c + ins BYTE PTR es:\[edi\],dx [ ]*[a-f0-9]+: 66 0f c1 90 90 90 90 90 xadd WORD PTR \[eax-0x6f6f6f70\],dx [ ]*[a-f0-9]+: 83 e0 f8 + and eax,0xfffffff8 @@ -609,8 +605,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 2f + das [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 jmp 0x9090:0x90909090 [ ]*[a-f0-9]+: 66 a5 + movs WORD PTR es:\[edi\],WORD PTR ds:\[esi\] -[ ]*[a-f0-9]+: 70 90 + jo 9be -[ ]*[a-f0-9]+: 75 fe + jne a2e +[ ]*[a-f0-9]+: 70 90 + jo .* +[ ]*[a-f0-9]+: 75 fe + jne .* [ ]*[a-f0-9]+: 0f 6f 35 28 00 00 00 movq mm6,QWORD PTR ds:0x28 [ ]*[a-f0-9]+: 03 3c c3 + add edi,DWORD PTR \[ebx\+eax\*8\] [ ]*[a-f0-9]+: 0f 6e 44 c3 04 + movd mm0,DWORD PTR \[ebx\+eax\*8\+0x4\] @@ -623,8 +619,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 8b 84 43 00 40 00 00 mov ax,WORD PTR \[ebx\+eax\*2\+0x4000\] [ ]*[a-f0-9]+: ff e0 + jmp eax [ ]*[a-f0-9]+: ff 20 + jmp DWORD PTR \[eax\] -[ ]*[a-f0-9]+: ff 25 db 09 00 00 + jmp DWORD PTR ds:0x9db -[ ]*[a-f0-9]+: e9 5b ff ff ff + jmp 9db +[ ]*[a-f0-9]+: ff 25 .. .. 00 00 + jmp DWORD PTR ds:.* +[ ]*[a-f0-9]+: e9 5b ff ff ff + jmp .* [ ]*[a-f0-9]+: b8 12 00 00 00 + mov eax,0x12 [ ]*[a-f0-9]+: 25 ff ff fb ff + and eax,0xfffbffff [ ]*[a-f0-9]+: 25 ff ff fb ff + and eax,0xfffbffff --- a/gas/testsuite/gas/i386/intel-suffix.d +++ b/gas/testsuite/gas/i386/intel-suffix.d @@ -1,5 +1,6 @@ #objdump: -dw #name: Intel syntax w/ suffixes +#warning_output: intel-suffix.e .*: +file format .* --- /dev/null +++ b/gas/testsuite/gas/i386/intel-suffix.e @@ -0,0 +1,22 @@ +.*: Assembler messages: +.*:7: Warning: .*suffix.*`shl' +.*:7: Warning: NOTE: .*deprecated.* +.*:8: Warning: .*suffix.*`shl' +.*:10: Warning: .*suffix.*`sal' +.*:11: Warning: .*suffix.*`sal' +.*:13: Warning: .*suffix.*`sal' +.*:14: Warning: .*suffix.*`sal' +.*:16: Warning: .*suffix.*`rol' +.*:17: Warning: .*suffix.*`rol' +.*:19: Warning: .*suffix.*`rol' +.*:20: Warning: .*suffix.*`rol' +.*:26: Warning: .*suffix.*`shr' +.*:27: Warning: .*suffix.*`shr' +.*:29: Warning: .*suffix.*`sar' +.*:30: Warning: .*suffix.*`sar' +.*:32: Warning: .*suffix.*`sar' +.*:33: Warning: .*suffix.*`sar' +.*:35: Warning: .*suffix.*`ror' +.*:36: Warning: .*suffix.*`ror' +.*:38: Warning: .*suffix.*`ror' +.*:39: Warning: .*suffix.*`ror' --- a/gas/testsuite/gas/i386/intel16.d +++ b/gas/testsuite/gas/i386/intel16.d @@ -1,5 +1,6 @@ #objdump: -dw -mi8086 #name: i386 intel16 +#warning_output: intel16.e .*: +file format .* --- /dev/null +++ b/gas/testsuite/gas/i386/intel16.e @@ -0,0 +1,10 @@ +.*: Assembler messages: +.*:21: Warning: .*suffix.*`not' +.*:21: Warning: NOTE: .*deprecated.* +.*:22: Warning: .*suffix.*`not' +.*:24: Warning: .*suffix.*`nop' +.*:25: Warning: .*suffix.*`nop' +.*:27: Warning: .*suffix.*`add' +.*:28: Warning: .*suffix.*`add' +.*:30: Warning: .*suffix.*`mov' +.*:31: Warning: .*suffix.*`mov' --- a/gas/testsuite/gas/i386/simd.d +++ b/gas/testsuite/gas/i386/simd.d @@ -187,13 +187,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f2 0f c2 38 10 cmpsd \$0x10,\(%eax\),%xmm7 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: 0f 2c 00 cvttps2pi \(%eax\),%mm0 #pass --- a/gas/testsuite/gas/i386/simd.s +++ b/gas/testsuite/gas/i386/simd.s @@ -193,12 +193,8 @@ cmpsd xmm6,xmm7,0x10 cmpsd xmm7,QWORD PTR [eax],0x10 cvtsi2ss xmm1,eax cvtsi2sd xmm1,eax -cvtsi2ssd xmm1,eax -cvtsi2sdd xmm1,eax cvtsi2ss xmm1,DWORD PTR [eax] cvtsi2ss xmm1,[eax] cvtsi2sd xmm1,DWORD PTR [eax] cvtsi2sd xmm1,[eax] -cvtsi2ssd xmm1,DWORD PTR [eax] -cvtsi2sdd xmm1,DWORD PTR [eax] cvttps2pi mm0,QWORD PTR[eax] --- a/gas/testsuite/gas/i386/simd-intel.d +++ b/gas/testsuite/gas/i386/simd-intel.d @@ -188,13 +188,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f2 0f c2 38 10 cmpsd xmm7,QWORD PTR \[eax\],0x10 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss xmm1,eax [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd xmm1,eax -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss xmm1,eax -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd xmm1,eax [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd xmm1,DWORD PTR \[eax\] -[ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss xmm1,DWORD PTR \[eax\] -[ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: 0f 2c 00 cvttps2pi mm0,QWORD PTR \[eax\] #pass --- a/gas/testsuite/gas/i386/simd-suffix.d +++ b/gas/testsuite/gas/i386/simd-suffix.d @@ -188,12 +188,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f2 0f c2 38 10 cmpsd \$0x10,\(%eax\),%xmm7 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ssl %eax,%xmm1 [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sdl %eax,%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ssl %eax,%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sdl %eax,%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ssl \(%eax\),%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ssl \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sdl \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sdl \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ssl \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sdl \(%eax\),%xmm1 +[ ]*[a-f0-9]+: 0f 2c 00 cvttps2pi \(%eax\),%mm0 #pass --- a/gas/testsuite/gas/i386/simd16.d +++ b/gas/testsuite/gas/i386/simd16.d @@ -125,13 +125,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 67 f2 0f c2 38 10 cmpsd \$0x10,\(%eax\),%xmm7 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 [ ]*[a-f0-9]+: 67 f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 -[ ]*[a-f0-9]+: 67 f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 -[ ]*[a-f0-9]+: 67 f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 0f 2c 00 cvttps2pi \(%eax\),%mm0 #pass --- a/gas/testsuite/gas/i386/x86-64-avx.d +++ b/gas/testsuite/gas/i386/x86-64-avx.d @@ -2854,10 +2854,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 fb 2c 09 vcvttsd2si \(%rcx\),%rcx [ ]*[a-f0-9]+: c4 e1 db 2a f1 vcvtsi2sd %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 da 2a f1 vcvtsi2ss %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e3 d9 22 f1 07 vpinsrq \$0x7,%rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq \$0x7,\(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq \$0x7,\(%rcx\),%xmm4,%xmm6 --- a/gas/testsuite/gas/i386/x86-64-avx.s +++ b/gas/testsuite/gas/i386/x86-64-avx.s @@ -3069,12 +3069,10 @@ _start: vcvttsd2si rcx,[rcx] # Tests for op regq/mem64, xmm, xmm - vcvtsi2sdq xmm6,xmm4,rcx - vcvtsi2sdq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2sdq xmm6,xmm4,[rcx] - vcvtsi2ssq xmm6,xmm4,rcx - vcvtsi2ssq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2ssq xmm6,xmm4,[rcx] + vcvtsi2sd xmm6,xmm4,rcx + vcvtsi2sd xmm6,xmm4,QWORD PTR [rcx] + vcvtsi2ss xmm6,xmm4,rcx + vcvtsi2ss xmm6,xmm4,QWORD PTR [rcx] # Tests for op imm8, regq/mem64, xmm, xmm vpinsrq xmm6,xmm4,rcx,7 --- a/gas/testsuite/gas/i386/x86-64-avx-intel.d +++ b/gas/testsuite/gas/i386/x86-64-avx-intel.d @@ -2855,10 +2855,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 fb 2c 09 vcvttsd2si rcx,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 db 2a f1 vcvtsi2sd xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 da 2a f1 vcvtsi2ss xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e3 d9 22 f1 07 vpinsrq xmm6,xmm4,rcx,0x7 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq xmm6,xmm4,QWORD PTR \[rcx\],0x7 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq xmm6,xmm4,QWORD PTR \[rcx\],0x7 --- a/gas/testsuite/gas/i386/x86-64-avx-scalar.d +++ b/gas/testsuite/gas/i386/x86-64-avx-scalar.d @@ -262,10 +262,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 ff 2c 09 vcvttsd2si \(%rcx\),%rcx [ ]*[a-f0-9]+: c4 e1 df 2a f1 vcvtsi2sd %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 de 2a f1 vcvtsi2ss %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c5 cf c2 d4 07 vcmpordsd %xmm4,%xmm6,%xmm2 [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd \(%rcx\),%xmm6,%xmm2 [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd \(%rcx\),%xmm6,%xmm2 --- a/gas/testsuite/gas/i386/x86-64-avx-scalar.s +++ b/gas/testsuite/gas/i386/x86-64-avx-scalar.s @@ -307,12 +307,10 @@ _start: vcvttsd2si rcx,[rcx] # Tests for op regq/mem64, xmm, xmm - vcvtsi2sdq xmm6,xmm4,rcx - vcvtsi2sdq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2sdq xmm6,xmm4,[rcx] - vcvtsi2ssq xmm6,xmm4,rcx - vcvtsi2ssq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2ssq xmm6,xmm4,[rcx] + vcvtsi2sd xmm6,xmm4,rcx + vcvtsi2sd xmm6,xmm4,QWORD PTR [rcx] + vcvtsi2ss xmm6,xmm4,rcx + vcvtsi2ss xmm6,xmm4,QWORD PTR [rcx] # Tests for op imm8, xmm/mem64, xmm, xmm vcmpsd xmm2,xmm6,xmm4,7 --- a/gas/testsuite/gas/i386/x86-64-avx-scalar-intel.d +++ b/gas/testsuite/gas/i386/x86-64-avx-scalar-intel.d @@ -263,10 +263,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 ff 2c 09 vcvttsd2si rcx,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 df 2a f1 vcvtsi2sd xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 de 2a f1 vcvtsi2ss xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c5 cf c2 d4 07 vcmpordsd xmm2,xmm6,xmm4 [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd xmm2,xmm6,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd xmm2,xmm6,QWORD PTR \[rcx\] --- a/gas/testsuite/gas/i386/x86-64-branch.d +++ b/gas/testsuite/gas/i386/x86-64-branch.d @@ -28,13 +28,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +[0-9a-fx]+ <.*> [0-9a-f]+