From patchwork Thu Jul 4 03:10:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1956582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Jr+E7qOQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WF1qd2TCCz1xqb for ; Thu, 4 Jul 2024 13:10:37 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33F9C384A490 for ; Thu, 4 Jul 2024 03:10:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by sourceware.org (Postfix) with ESMTPS id C0DD63858430 for ; Thu, 4 Jul 2024 03:10:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C0DD63858430 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C0DD63858430 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720062615; cv=none; b=Oq7pkeBLa+C12YtC/EBVfmj5ZJ0lAmbsPINPXKCtKrkpaTs0dY57vNOekbemcVhFWaFirQ0V8KeoaYQKctFsOTSF37A8PxDRNoaNZhmFCFs6gBUeBOqvB+EitXEDp6w6eCZDsmqEwUcPf6A7Q+r/CacebZ1zksvSWfp6ccehhTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720062615; c=relaxed/simple; bh=gzzxCLqU/OPZGltjOfVACVXwCpZemca1Kyb7Dnh+qcM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:To:Subject; b=kRhg4szwMF/KP155Ol02qhHVJ+vk8ouFOVKWjNMw22jFDZ1GOf42nSP2wyOuF5QcKMiHNEZI518VrawW6Iii/VswvqnOCBgNM+HBz3Or5VOWFl/XIxYqU3SO8kBocisYjzY1JL9lMgw7cdOQYnKIr/Z38Fc0A5e7t4oPSBmcvPU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-5c479610487so57472eaf.3 for ; Wed, 03 Jul 2024 20:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720062612; x=1720667412; darn=gcc.gnu.org; h=subject:to:from:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=fhr9tvwaLsskbMHnCbT8QvyzJmT1XJQ/0wnr0iJxcS8=; b=Jr+E7qOQ+X6iNuyBDiJmYOVxFRyL8Lu3fqMhBqGX+gTZuKhq3lbAcj6SInYhZxETCJ x+fk7AELC32gRyUHf/FmL3B45Q53t4G2ocxSWrYWSumoIbMD6e/+lmnqlPVAUAr2nd+A mHqiePX9GvdgJM4Uuas2+yJwvzc56nBie2PGoULh2kOyWrHznOfwYMvFNGHo+jrJ1Fc4 MdjczdIO+STROzTno4crcyyyP2aY/bnBtnFk3iubP6ZFQqczMLLgZDywgl5y4cvDq9jw WakgvSVbBj4w+bYe0bqJPI0iLwhW7cPMwZVk3ev2lBea5YRCVxBG8KTXT5a/XMol2P1T r3Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720062612; x=1720667412; h=subject:to:from:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fhr9tvwaLsskbMHnCbT8QvyzJmT1XJQ/0wnr0iJxcS8=; b=qlnWUJnRdw2J0AQROB7NUuuY4HMR2bRDyWbxE1M/uwNf7DrVXbFtTz8FibTD+H8fFg C5+pcSIHRQ5BZmxvIuvVhOQN9vPMBWgcncHBBDGRMH1sxoMM5xh+rDPJLb+vudj1QKYb EZdiuqtNvIfqsiPwj1AghXfRuuAhleMQFyW3boip90QjhHLWRKx+dCrL2K7HH6UV9RAz hZOm2UR+vkT4vqDIZe8moXmn3ykEXWLpcP12QiVl+UPYHqF2N2KzdGZlcU1pF7cS3tRj rLl4mMRgqL/NJ3AdNlCaOgieybtUXxg4Ie3WvvQxy1V6b3pukjyRcDeyHEfIrhjqG3xw J+Cw== X-Gm-Message-State: AOJu0YxBlpSPNgm3LTu+rSniu6v0nuWJnLWDxNoXnGReOEvWKxZsng9P RTtTAReK4yH47h90SYN8oEZCObRLj/XFoF81zyhnyTuDigD1bPwvGcApZg== X-Google-Smtp-Source: AGHT+IFeJRYY4mSruyXce0/FHoH71lPXRYUeQy90RW5z0j5Bq9Qaqk5cAQ5z8ktlsXy8UxODmHCoyA== X-Received: by 2002:a4a:bd04:0:b0:5c6:47dc:2bd2 with SMTP id 006d021491bc7-5c647dc7cbbmr452665eaf.6.1720062612273; Wed, 03 Jul 2024 20:10:12 -0700 (PDT) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5c4543b9aeesm909198eaf.19.2024.07.03.20.10.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jul 2024 20:10:11 -0700 (PDT) Message-ID: <581f87d5-3fbe-424f-bb75-23414c53ae10@gmail.com> Date: Wed, 3 Jul 2024 21:10:10 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Content-Language: en-US From: Jeff Law To: "gcc-patches@gcc.gnu.org" Subject: [committed] Fix newlib build failure with rx as well as several dozen testsuite failures X-Spam-Status: No, score=-8.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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The rx port has been failing to build newlib for a bit over a week. I can't remember if it was the late-combine work or the IRA costing twiddle, regardless the real bug is in the rx backend. Basically dwarf2cfi is blowing up because of inconsistent state caused by the failure to mark a stack adjustment as frame related. This instance in the epilogue looks like a simple goof. With the port building again, the testsuite would run and it showed a number of regressions, again related to CFI handling. The common thread was a failure to mark a copy from FP to SP in the prologue as frame related. The change which introduced this bug as supposed to just be changing promotions of vector types. It's unclear if Nick included the hunk accidentally or just goof'd on the logic. Regardless it looks quite incorrect. Reverting that hunk fixes the regressions *and* fixes 94 pre-existing failures. The net is rx-elf is regression free and has moved forward in terms of its testsuite status. Pushing to the trunk momentarily. jeff gcc/ * config/rx/rx.cc (rx_expand_prologue): Mark the copy from FP to SP as frame related. (rx_expand_epilogue): Mark the stack pointer adjustment as frame related. diff --git a/gcc/config/rx/rx.cc b/gcc/config/rx/rx.cc index 8048cc98708..c84e1398aad 100644 --- a/gcc/config/rx/rx.cc +++ b/gcc/config/rx/rx.cc @@ -1845,8 +1845,7 @@ rx_expand_prologue (void) gen_safe_add (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (- (HOST_WIDE_INT) frame_size), true); else - gen_safe_add (stack_pointer_rtx, frame_pointer_rtx, NULL_RTX, - false /* False because the epilogue will use the FP not the SP. */); + gen_safe_add (stack_pointer_rtx, frame_pointer_rtx, NULL_RTX, true); } } @@ -2119,7 +2118,7 @@ rx_expand_epilogue (bool is_sibcall) /* Cannot use the special instructions - deconstruct by hand. */ if (total_size) gen_safe_add (stack_pointer_rtx, stack_pointer_rtx, - GEN_INT (total_size), false); + GEN_INT (total_size), true); if (MUST_SAVE_ACC_REGISTER) {