From patchwork Thu Feb 1 19:16:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 195445 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp391147dyb; Thu, 1 Feb 2024 11:18:09 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXaOQ1epiZ15MtkG6JR8i34KD2pxTXK9vF68mXd75WmMVnazUwr7aoDN5DPWEM4RyHG3Bang3qISDdczUtE0bbWy6ZqXA== X-Google-Smtp-Source: AGHT+IHg9sZcryeG0q+gm2/4/PYuy2wsQOEC07yADbRycXHVyuehaGPZ1+QBkux51dVZyHgtE63S X-Received: by 2002:a05:622a:509:b0:42a:5862:ec2b with SMTP id l9-20020a05622a050900b0042a5862ec2bmr10833868qtx.25.1706815088679; Thu, 01 Feb 2024 11:18:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706815088; cv=pass; d=google.com; s=arc-20160816; b=Zhabv3gOND+mgnJpMb3g302dU8pDyuMu+EC4Q/aB3qKCbsYRsK5P+NH1zgh3E2ArO3 nyBo6b5b8DFV+PAzTdW2BbkvW8p3e7kndpZjLOzk4Za33I2hiocnhlXHSmeOvpiwa4pD kCsR4yRUR2hEXmyDjSvzrzyynhBBOkvGCCFiDPdpreLPRRWKHsQ28xaIQ0bd8t3qevNu rBiFqAo9cktPs9vHSo6K3deZ1Qtxk3KvCG25T//j7lLNIcFrWs+Y+rqZC/fIvNoA8FK8 x9553k+/xKtfGpzl2h0QskqURmMYxYYrpYJ9yZtkI3faIZh+2ed1GpbbAALBmw99I8X8 A+1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:arc-filter :dmarc-filter:delivered-to; bh=ElEdKGsb9C0BIZvgeLHpGMbqj6/PF/5E1MUMjyTy+tg=; fh=airjl0MODtGhVFdtXXhEbvu5VkUGJBq7Bbph4q/3jwY=; b=BpUkdL2h133Y75mP0u8ZB9e/0UK4pZFUtiAIreT7dUxIyu4w/G4r+58GH9hctCXdP+ eUtHyRcgDa5lqrFNS5bodkpuqGmUM8LcIdpk9+GfbcsHiaPuTdvnNmbrex78MCWrpZPW mlmq88GFILbQgeR9s8stIeNCeFEnWkCMcL72QtJPJmelCjaqxbY77Zzu2ovieAsUMWa6 hOAXoUhZNGMFOApjfcCDMWULj3EdpbRVIZDg3grX1BEn6YXtOTDVP71fPcrpvBy84mto VaI9k9Oumbz1S+b0DEncVEO8HqofHrme+mstfUtf70ud0NtjJE4CngHNlVxr6mywMk9u BOIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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" X-Forwarded-Encrypted: i=1; AJvYcCW/Z1HwklUTtGwA0YWXSYhCzCvPda1B7Gpcy81xFORR7bBLOQHR6jXOF+/0BY+Ank0qGUMHSsIyqOveVs0fcvOoCkT3Kw== Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p19-20020a05622a13d300b0042aab9d796csi124610qtk.713.2024.02.01.11.18.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 11:18:08 -0800 (PST) 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; arc=pass (i=1); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63F8138582BB for ; Thu, 1 Feb 2024 19:18:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (dellerweb.de [173.249.48.176]) by sourceware.org (Postfix) with ESMTPS id 4BE413858020 for ; Thu, 1 Feb 2024 19:16:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4BE413858020 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=parisc-linux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=parisc-linux.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4BE413858020 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=173.249.48.176 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706814998; cv=none; b=eVYfWn47d1/HQS8ofmiaf7m6mBrgfan6//5RzHThUvltp0GVFXJsPyIeP1ysUoZMjaqgkDotNtJR11GU8hWsg5PaK08A1swE9lDpLFl2ifWiwv3IwlLSE20F/gmPg6uWNJRu5t34XNK65M5k/RjUAe1OzrefZYwxyqP0Aq8WE14= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706814998; c=relaxed/simple; bh=M/fxAjQXgyoLoeYa314ZOxNn3ScwyAbRzRRYcLs8kbE=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=X8dv8Aq0+qLz59ePKn4i+dVADWXN5uG4u+1jo1BfGOTqsLb2WYVuZY69RPiBZ5wQonddwrn+5uUev+FKH9Cd9RpTTb9I2KKLs8lOk6/B2szvXo20le+cksMZezMP6fqiTE/0F+EMLBrzqUH2xNpdIKDKBqo4FvTUTJSdDTGEElo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mx3210.localdomain (bras-base-otwaon0906w-grc-03-142-126-114-79.dsl.bell.ca [142.126.114.79]) by dellerweb.de (Postfix) with ESMTPSA id 09CE6160002E; Thu, 1 Feb 2024 20:16:35 +0100 (CET) Received: by mx3210.localdomain (Postfix, from userid 1000) id 9D6C822012D; Thu, 1 Feb 2024 19:16:33 +0000 (UTC) Date: Thu, 1 Feb 2024 19:16:33 +0000 From: John David Anglin To: GCC Patches Subject: [committed] hppa: Fix bug in atomic_storedi_1 pattern Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789725338765813042 X-GMAIL-MSGID: 1789725338765813042 Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Fix bug in atomic_storedi_1 pattern The first alternative stores the floating-point status register in the destination. It should store zero. We need to copy %fr0 to another floating-point register to initialize it to zero. 2024-02-01 John David Anglin gcc/ChangeLog: * config/pa/pa.md (atomic_storedi_1): Fix bug in alternative 1. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 52ad0c3776d..aecdcc98b6a 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -10723,13 +10723,13 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" (define_insn "atomic_storedi_1" [(set (mem:DI (match_operand:SI 0 "register_operand" "r,r")) (match_operand:DI 1 "reg_or_0_operand" "M,r")) - (clobber (match_scratch:DI 2 "=X,f"))] + (clobber (match_scratch:DI 2 "=f,f"))] "!TARGET_64BIT && !TARGET_SOFT_FLOAT" "@ - {fstds|fstd} %%fr0,0(%0) + fcpy,dbl %%fr0,%2\n\t{fstds|fstd} %2,0(%0) {stws|stw} %1,-16(%%sp)\n\t{stws|stw} %R1,-12(%%sp)\n\t{fldds|fldd} -16(%%sp),%2\n\t{fstds|fstd} %2,0(%0)" [(set_attr "type" "move,move") - (set_attr "length" "4,16")]) + (set_attr "length" "8,16")]) ;; PA 2.0 hardware supports out-of-order execution of loads and stores, so ;; we need memory barriers to enforce program order for memory references