From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102e.google.com with SMTP id 3-20020a17090a0f8300b00212d5cd4e5eso16334440pjz.4 for ; Mon, 31 Oct 2022 09:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DpXWq/vyc29th371Xkws8RS8i3BOgjnENCYeX/LF3AU=; b=kR5loha5491AFArPFKUrVs4e5eQPV/mBwPW4+QLYUqTetljRYWw1oy5xbnydA5jxET m/tzsfgZXBytFgaZsLD1BlyETv4yu2me46Zl8nkJ4qDbOrH3fVHV/9BkmZDspxYI+1JP DvXIVXME7985pMbMwoKvveAkdkNHfJwsxQghxMEOKV1SyoQmJ+mGSQ9t3WqtQLBXh1bg mvYuVvA1w7af+4fiO95E8A17yL9Tl7rMfhitxSAhb/DnKJiDQ4nw3iPJ5+F85xsf0J43 SNkORWYOhRwOwJyy7+1lYhEP+cNHfoztUphSIUcKlSOZJxoUeP/M09psodMRXflpzbN+ BvQQ== 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-Google-Smtp-Source: AMsMyM4wgjnjjRlARyqIo4IxbVRt9UCQWR2SST7ND9ogo2f+BiWbm0cLcfGC2LIZbq+KXjlI73Yz+Q== 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) From: "H.J. Lu" To: binutils@sourceware.org Cc: Lili Cui 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 List-Id: 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 -- 2.37.3