Message ID | 20230809115325.3716347-8-c@jia.je |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2744915vqr; Wed, 9 Aug 2023 04:59:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFp9Syx8IaILJYivYGt6SCASD7IcKBKloEiz/orP6rGZAoEpohUDskyp3H9aQRnqXYafGqd X-Received: by 2002:a19:8c06:0:b0:4fe:2ac1:4151 with SMTP id o6-20020a198c06000000b004fe2ac14151mr1512620lfd.63.1691582364267; Wed, 09 Aug 2023 04:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691582364; cv=none; d=google.com; s=arc-20160816; b=EhNuP/jz1w4dro+cZmwXYNNVlzCm9sMuAxeJ9OobWIO0Z0IZ2Joe2dGG/WxeSAcpfO KfHr4sLSuubIk8Onvyd07Bayjbgo/WLS3em9qL+HKPhsoF3jiXCSxmwHwJy9wa7+D6RG cjE0iS7wR0nOeugEI9lVlDBa+3P6sGMqj2LkHNrJBYLC93RBaeP4/aYAz5UmULTJ7zZa V/JY2YSq9GMNF+xCzHw7vl9UNkS28QJ5sjfJapseeOdq+A+bvXWeGgRTNbBsZYOM+P2M VHPmuHgZbFzhu9+00yBcTAy4A2GziZ2wwzXvNk3rgCmnRpiVeCrm4x5k4MUzFanaSLig Awpg== 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:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=QQMHVki5kiJfU01pzQWZa1+SXZ5H01vdTAvCDlJiP0Y=; fh=nBdY3vW/mgwv3C0AxagIWVpWoiWSUh4TsWT+uiKUcFM=; b=O9+O+eKhtv6qvUlPEjOaLVDUQJQuiNhnK16XVAzEJ7juj4vnvidPstVHNvwc6EQV1d rJ0459ajzp10OOVL+NWJVDQcyUVcMcAY2JH63A6vwW0980zkUac/h+uBzRubsWNht6EQ xhULAnJNF04DPswL4B4H315V1q0wvyOzuvIpM0zI7iMtIWOCCGbuQDnq/iFcgFI7O7T1 a9UihBWYVDdXdH0u4Zj2gr8aH29dqggH+Ponll3NfTr5mKvaygd2snrDgxtkCxigKKtZ yLFzCypjolph3AwKlI0Y4LrNnn97tHDVAzybP6I8WPeK2QAuBGwfUSAdGojloN+gjW7I s3OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lKkkXWNw; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id w6-20020a50fa86000000b005234a115ba9si2207768edr.480.2023.08.09.04.59.24 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 04:59:24 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lKkkXWNw; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 102FF385277C for <ouuuleilei@gmail.com>; Wed, 9 Aug 2023 11:57:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 102FF385277C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691582249; bh=QQMHVki5kiJfU01pzQWZa1+SXZ5H01vdTAvCDlJiP0Y=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=lKkkXWNwXI2287E9+mCCYQCeXeY7obAESf7XO9WhY4HUqNWWrJhWFrDb6ticM7qnW W17Bdw3yshL1y73EP1fTHyqvg4Jhc2aHOrBvckY+0jIvmt3IaUzeDOSV2yxLMSnGax WyUyqfFALJG5e/Vr435MmMqlxBhw7v3SOOH8Ms0Y= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from hognose1.porkbun.com (hognose1.porkbun.com [35.82.102.206]) by sourceware.org (Postfix) with ESMTPS id 52F52385AC3A for <gcc-patches@gcc.gnu.org>; Wed, 9 Aug 2023 11:54:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52F52385AC3A Received: from cslab-raptor.. (unknown [166.111.226.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: c@jia.je) by hognose1.porkbun.com (Postfix) with ESMTPSA id 2C1F844026; Wed, 9 Aug 2023 11:53:59 +0000 (UTC) To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, xuchenghua@loongson.cn, Jiajie Chen <c@jia.je> Subject: [PATCH v2 07/14] LoongArch: Fix signed 32-bit overflow for loongarch32 target Date: Wed, 9 Aug 2023 19:46:14 +0800 Message-ID: <20230809115325.3716347-8-c@jia.je> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809115325.3716347-1-c@jia.je> References: <20230809115325.3716347-1-c@jia.je> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jiajie Chen via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jiajie Chen <c@jia.je> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773752669098952459 X-GMAIL-MSGID: 1773752669098952459 |
Series |
LoongArch: Add loongarch32 and ilp32 abi
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jiajie Chen
Aug. 9, 2023, 11:46 a.m. UTC
When rhs equals to 0x7fffffff, adding 1 to rhs overflows SI, generating invalid const_int. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_emit_int_compare): Call trunc_int_mode to ensure valid rhs. --- gcc/config/loongarch/loongarch.cc | 1 + 1 file changed, 1 insertion(+)
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index c980de98758..49df9509ba9 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -4284,6 +4284,7 @@ loongarch_emit_int_compare (enum rtx_code *code, rtx *op0, rtx *op1) break; new_rhs = rhs + (increment ? 1 : -1); + new_rhs = trunc_int_for_mode (new_rhs, GET_MODE (*op0)); if (loongarch_integer_cost (new_rhs) < loongarch_integer_cost (rhs)) {