Message ID | 20250306154737.70886-36-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:64c8:0:b0:38f:210b:807b with SMTP id f8csp334731wri; Thu, 6 Mar 2025 07:56:55 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW7kN7HSyIzZ/ApO/zNWaLNHc5x3szqT/3hzNGYrgZwHBsIBDE67X4h0oyuQ3I+4QQr+WJNkQ==@linaro.org X-Google-Smtp-Source: AGHT+IHuR2/u98aIpzsIdHQZdVtqDcj3iXsQI2iUZwMXJIqob4D5S4QXEVQPvHfJ6t9O3EQ/2u/N X-Received: by 2002:a05:6214:2027:b0:6e8:fabd:ddd with SMTP id 6a1803df08f44-6e8fabd1133mr32204986d6.1.1741276615516; Thu, 06 Mar 2025 07:56:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741276615; cv=none; d=google.com; s=arc-20240605; b=TXfQP8S/NFUFxDFN5FkBznAqxa/RxrTUT5NVU7Vxq+q5Njhiv7QSH8o6QPXHejwHgw 6k+qpquBEa8VQIhAtqdKG3hnZgz8KorWHBQQk1KiTlxiqJOrz2VLOtBc6JybwQ5fAjIq 9HHlEyRUzswlayStZ1y05003VBjtXj541wijO1m6cK+cVO9qJDPhKQm3vSo2lpdEsVIs KQSMoaaSNdh7eY8yo57is0e0O4azIFrNi24tWZX55vahESvDC++BsZCYcI45AHkop8wT vGAO6i/JaJcjWrXhkfQc+lXKI5e+WEqPfvhAr2+M1hbQ0++OxQxTEW69kmkDTu6ab1JS tQ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=SnfT7DORVv/itpA6HOJTnRR+mH0KMqcNOFRFeDG2Dgs=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=D42o8jw8WWpyzQzpLK+RGEMjmkdII2zhD7xkisukigl+VCycGZmUB3RgPZBA1vze/t KYGAZoQFSY4XcIGF2mStuUFLXigQQuDUGtIh3tJF8BCxcp40GkAjfbowmnQpAjNLwo8e FC5pZlZgEQeSLLWEzNsjWb6j0IiPs0fPg223q2ihGidv1KCi6DVye7UhlAMHjHxiPiji RxtxrRpaAkb+8BpAmrdnaEG7mdBcKgI92YbVkzMSMBcmYN716x00cmuGtR9BohVhLoLE DvWBYC65/3lJKw5mQ7yfeiEFu0+9zqAFyuAtXXW/GEulTnjeCJ+8wPzQD+GtjcG4+5hc DuMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yj7K6hgr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e8f707cf5esi13737796d6.37.2025.03.06.07.56.55 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Mar 2025 07:56:55 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yj7K6hgr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tqDVl-0004uU-KM; Thu, 06 Mar 2025 10:51:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tqDUJ-0003bs-FL for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:21 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tqDUH-0006gE-Sq for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:19 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43bd45e4d91so5732075e9.1 for <qemu-devel@nongnu.org>; Thu, 06 Mar 2025 07:50:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276216; x=1741881016; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=SnfT7DORVv/itpA6HOJTnRR+mH0KMqcNOFRFeDG2Dgs=; b=Yj7K6hgrmwS8yc+mDL3njIWiaOEuCfidpJUdYVFZOLSPQSDkkTRA5AuAfXVPqKbd1R 6wtKWRne6bb4PxTlKtMdFAzI2wk8lWTTmMAqgjg0YVaZiIT5k8r0H1hJKAHNBfJIkHrP xxAWPh0cj8/ZCdO5kAPasXMivgiV3cYxi/ydvsu+/BftXh9DiZSAyCqIRCAZWM3906pL +OhV/nEHTUtHqNygBBTdb35yonDKUUG+Id+MqvShiAAG/+3ryaPcW87O2EBrZmeClhhm jQ31gyipbrQaTccUdKarwS4a2l4A1OtQLN9gTSniLYuXuq5Qf2Wdy89qA+BNb2zOR/on BbQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276216; x=1741881016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SnfT7DORVv/itpA6HOJTnRR+mH0KMqcNOFRFeDG2Dgs=; b=Y8Un+bguR8Taa0lTi2MBDu4C/Gh4b7sbVT6DGIL7myXe+BHpTxRm84D6k3r3H+SmK/ L0vjCBDBiq853whTUH8Vea7dkq0WMpS4iC6ZSsZfENga5oa9RML4CycGDWkKyQGJH9PF onF2XUEu+eT5I1FwrmbrEo6ho/eTU7NZ0Q0ZR0/8hGLIexC3epXO+AD/DLn0gh+7MsSC gDJWmocg011socxrk+1AqxB3E2Ifm6kPRScS+6l4E3Nhh45E2VgTJIWV77xahqKcd9lA hZTQZzkp9u2vMpr1f0ihf7Xf60wIsHqyF1M3rMystTVPn6OlsVersD31vW66rS3SwOw9 rDEg== X-Gm-Message-State: AOJu0YzZeQoLaPjn3bMJINmV3wbF6kKWBhrJWNjtLZwWKa8J/H4ggDrH D4Nq8K86Nc5wla+SHLWPYT3DO/nlG/6MCUTICUcWXxa7W83IlJLH7Y/dO76DzhG9h4bRZDnKjAt kbrk= X-Gm-Gg: ASbGnctCMe0wnUOHODKu3DILNDfxIG7rvgXCgQfXkd8haoL0SmkqWmXXxDbOhP0PoAs 9G7SKaBTK7hUQR3KsImxBfJT9a21arcz+1bsY/LJznn/M4wUp+ALfQ9fpowNRg61u12eSHXYQHx gEoI2Hjn0l24gmj7D1CioC1EiDjE7CoL1qOLrr1zOCAkad1NxrEVoAJahEoIwodGrL6ppUPpEag BgSxn//3Byurnhq90ehlVLJVTgQdgf3z7lQ9gaGmF67UImH2a246FWffMhTEPHM7oMtJthPKkNi j3uTPgeqMwZiARwF4ZFGF0WmIo000TRvnWaC7pgyPqkztQHXA1flbiRxt0DHrAw6434oeNF4bzf z5S6qGNfZKIXo3uMILio= X-Received: by 2002:a05:600c:458f:b0:439:91c7:895a with SMTP id 5b1f17b1804b1-43bdb38dd94mr30596655e9.7.1741276215897; Thu, 06 Mar 2025 07:50:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd8db6c7sm23249105e9.22.2025.03.06.07.50.15 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:15 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL 35/54] target/mips: Fix possible MSA int overflow Date: Thu, 6 Mar 2025 16:47:17 +0100 Message-ID: <20250306154737.70886-36-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/54] qemu/compiler: Absorb 'clang-tsa.h'
|
expand
|
diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index ec38d9fde5e..74fb80cc256 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -5577,7 +5577,7 @@ static inline int64_t msa_mulr_q_df(uint32_t df, int64_t arg1, int64_t arg2) { int64_t q_min = DF_MIN_INT(df); int64_t q_max = DF_MAX_INT(df); - int64_t r_bit = 1 << (DF_BITS(df) - 2); + int64_t r_bit = 1LL << (DF_BITS(df) - 2); if (arg1 == q_min && arg2 == q_min) { return q_max; @@ -5685,7 +5685,7 @@ static inline int64_t msa_maddr_q_df(uint32_t df, int64_t dest, int64_t arg1, int64_t q_max = DF_MAX_INT(df); int64_t q_min = DF_MIN_INT(df); - int64_t r_bit = 1 << (DF_BITS(df) - 2); + int64_t r_bit = 1LL << (DF_BITS(df) - 2); q_prod = arg1 * arg2; q_ret = ((dest << (DF_BITS(df) - 1)) + q_prod + r_bit) >> (DF_BITS(df) - 1); @@ -5700,7 +5700,7 @@ static inline int64_t msa_msubr_q_df(uint32_t df, int64_t dest, int64_t arg1, int64_t q_max = DF_MAX_INT(df); int64_t q_min = DF_MIN_INT(df); - int64_t r_bit = 1 << (DF_BITS(df) - 2); + int64_t r_bit = 1LL << (DF_BITS(df) - 2); q_prod = arg1 * arg2; q_ret = ((dest << (DF_BITS(df) - 1)) - q_prod + r_bit) >> (DF_BITS(df) - 1);