From patchwork Mon Oct 31 16:06:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 13337 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2401649wru; Mon, 31 Oct 2022 09:11:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4WLdMP9zF6u2Cg0MAlKNfpEL7NeGADijPGXCJ5iKZJWHrkhMuiNW55UE66GsTXujFHM4n4 X-Received: by 2002:a17:907:2d91:b0:78d:8747:71b4 with SMTP id gt17-20020a1709072d9100b0078d874771b4mr13858691ejc.545.1667232700483; Mon, 31 Oct 2022 09:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667232700; cv=none; d=google.com; s=arc-20160816; b=AIbbKVq51BrCBP7s+jua6NxRbJ0GEV2uSd7frqOKhYHOY1Wy7y8c+QPtcIq79Bt/Oz 6yAaQHcGX9OqHcmEsXGKmuEA7EONYAa61E6yMaDYTwdnopuF5coLaaUGwU1ZS1szkrBd zpSl6UzqgjrL1dOBQcVZ5Xb4D1oAnVJ4lXdtPTa/C8yCsfALTUVMoSEi/gou8OwAtFY8 fCLQk3terJkMlnUEKQxzk7E3Qv//4mnQcW74h03X/+7mvHJ5HiupjklEU5dUp5lGW6+T CM/YGgP2nq1SOtrHve6SzF0VdOnT9xraT55Moq3QlleAc2cIlnUnaulz3GpSM6AQBXfb iwQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=DpXWq/vyc29th371Xkws8RS8i3BOgjnENCYeX/LF3AU=; b=ooRkjajN6U+TFfVf1WH9OSSlgALr19SaPqx/Q+h8lFelibWiLrqxLuoLMfaZqvif1W bTGJXh/Etd84mBUzkV/ZeLJurFf3D7CY9vnf/+un9c0f1dXTsjV7uzBaIShJ6Siib5f9 6F2KzLhx6ILpFlWFdMuuJNpBbUC3lM+84Mhcg+7YmwJNAD2ZZwUmll/kBVc233iTGpFd g+yrYN7L/Zels1s2w1qR8MxXcrCEX9YmgpAZOZqVy8sqG+z0f29p9ko4R79iGh/J3Hxn 2bZIl5/deOo8Q2Z1K6wKpi4yTAAVyR3B1YU3yb44dg6vwNt3/hWUTepGijr+b8+QTnvo HcYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=FSI5LLR4; 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=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qa6-20020a170907868600b007adb2868da6si9781300ejc.646.2022.10.31.09.11.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 09:11:40 -0700 (PDT) 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=@sourceware.org header.s=default header.b=FSI5LLR4; 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=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CC1513851C0E for ; Mon, 31 Oct 2022 16:06:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC1513851C0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667232399; bh=DpXWq/vyc29th371Xkws8RS8i3BOgjnENCYeX/LF3AU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=FSI5LLR4S1KVYUBkyXqE0BCQA04jjskFx6JZ348lPP5QVQKYY6GrrTEP2J2RHa/lY 39M7SMukrKn4jY8NfhZJHLV+4KqvcUEShe4bZnaJl5nPETIEDLxYbWUe/cON1tVy2A ea04jUV03BQJjhwPbPG1Rv29zco6ZpNB43ttil50= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id 840BE3855587 for ; Mon, 31 Oct 2022 16:06:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 840BE3855587 Received: by mail-pj1-x102e.google.com with SMTP id 3-20020a17090a0f8300b00212d5cd4e5eso16334440pjz.4 for ; Mon, 31 Oct 2022 09:06:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DpXWq/vyc29th371Xkws8RS8i3BOgjnENCYeX/LF3AU=; b=MEkqZYb4uzbkrG3UXtosXoEawEU9Z77eKLD9F+1totUSmR8x0msq5f5iqz0GODauuf 8hESqWgJXJ/RLfvDHKduzY8tL/AUhgkHhLhxH8XCudl0lMh94IyV9fIWPfsiFBMqd6t3 51zfO+nesrBu9qw4Or597lAYcck0yvorIZgTVWfpLmlxx0rUYhFNDS4UUQs8YgoF4v8l TuK5n9JZ8rELItcX+CLe5m6/qaQiSqgyJ7gPo0uDrTLHfyL2iPk1CiKn0jDI17Abw6dp 62W9bcEGMcSXcR4v9JzAnE92KhtCJHFGqtyqg605jEKUSPh+BPCwLtUGp17wXREilfUP ZxlQ== X-Gm-Message-State: ACrzQf1t54ANYA3zULarq/Wng+nJrdauOjJJo9ND50DX9tqLdsAWSsq/ AzhfPKHygUbpbzlBPhsrftFCp73VRv0= X-Received: by 2002:a17:903:32c8:b0:187:222d:c3ba with SMTP id i8-20020a17090332c800b00187222dc3bamr5621324plr.126.1667232388322; Mon, 31 Oct 2022 09:06:28 -0700 (PDT) Received: from gnu-tgl-3.localdomain ([172.56.31.252]) by smtp.gmail.com with ESMTPSA id 22-20020a17090a031600b001fb1de10a4dsm4355456pje.33.2022.10.31.09.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 09:06:27 -0700 (PDT) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 0601EC0487; Mon, 31 Oct 2022 09:06:26 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH] x86: Silence GCC 12 warning on tc-i386.c Date: Mon, 31 Oct 2022 09:06:25 -0700 Message-Id: <20221031160625.684434-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-3026.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Binutils" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748220196130293063?= X-GMAIL-MSGID: =?utf-8?q?1748220196130293063?= Silence GCC 12 warning on tc-i386.c: gas/config/tc-i386.c: In function ‘md_assemble’: gas/config/tc-i386.c:5039:16: error: too many arguments for format [-Werror=format-extra-args] 5039 | as_warn (_("only support RIP-relative address"), i.tm.name); * config/tc-i386.c (md_assemble): Print mnemonic in RIP-relative warning. * estsuite/gas/i386/x86-64-prefetchi-warn.l: Updated. --- gas/config/tc-i386.c | 2 +- gas/testsuite/gas/i386/x86-64-prefetchi-warn.l | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index fb1ce75fffc..cccd83717d0 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5036,7 +5036,7 @@ md_assemble (char *line) /* Check if IP-relative addressing requirements can be satisfied. */ if (i.tm.cpu_flags.bitfield.cpuprefetchi && !(i.base_reg && i.base_reg->reg_num == RegIP)) - as_warn (_("only support RIP-relative address"), i.tm.name); + as_warn (_("'%s' only supports RIP-relative address"), i.tm.name); /* Update operand types and check extended states. */ for (j = 0; j < i.operands; j++) diff --git a/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l b/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l index 4e153894638..49be004cb90 100644 --- a/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l +++ b/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l @@ -1,5 +1,5 @@ .*: Assembler messages: -.*:[0-9]*: Warning: only support RIP-relative address -.*:[0-9]*: Warning: only support RIP-relative address -.*:[0-9]*: Warning: only support RIP-relative address -.*:[0-9]*: Warning: only support RIP-relative address +.*:[0-9]*: Warning: 'prefetchit0' only supports RIP-relative address +.*:[0-9]*: Warning: 'prefetchit1' only supports RIP-relative address +.*:[0-9]*: Warning: 'prefetchit0' only supports RIP-relative address +.*:[0-9]*: Warning: 'prefetchit1' only supports RIP-relative address