From patchwork Wed May 17 20:39:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 95546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp39944vqo; Wed, 17 May 2023 13:40:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kV0f3vgGqMXYG9h9Rb9usm2q9HDbWNw9UsFmAx3lpHa4+7YZy9t6xob2as85p2JNprQOZ X-Received: by 2002:a05:6402:2807:b0:506:b94f:3d8f with SMTP id h7-20020a056402280700b00506b94f3d8fmr3562165ede.5.1684356022965; Wed, 17 May 2023 13:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684356022; cv=none; d=google.com; s=arc-20160816; b=Lj6pBD7LPqtIjfyREWea915c0deWWjmCyAm97OPM2WX0dZPQlxY8Df7wMYQLkdpgyP eAHltwqQgzXLhuwwkvnBH62Sxx3TQcAlfuNA4N1A587Xur0lBmiGmDDuH1DTEVP/4jWn HIZwn8IhcgucJC3FpRhSPGfgVZAM4avcjHzZns6k23RbkPKcvdPOJloS5mL7dUE7L0Z/ wkVWhmIImeupuD8tNUTCmfUs3JDUxE0x0qWIUIGfce3vEyDVWbIQ33yk+dou7qXOWvjQ dL74nA8a81jCggZIp4P535KSKr02Bu6xhZAY76E6m35PuHx6p/JsQhjOrPlBPkPHgVcC m9dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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:dmarc-filter :delivered-to; bh=PTDatMR5jaH+l8JlA1xrmOW/k6K2X0QV0YLZZk8jxvg=; b=D04NEmNKT49r71WxY/dTyDQnXctotUrw2s71r0TKE7YB/0chpdG9j16Qm95CReAlgl 1T3C69VKyAH62OFbW5GriqkreZ6lCIG7rxYJ8Fo9WIqkJxKdjWkVytwECrto4pHR2N2f zNMOsqgyAZv9xlKyGkH9t1IBSRJo/Cd13T13pOurI+LVfecgK/6yZ28KqncbJ0mjGqOA ydao5Y0ThDrZJAKqizTSzl474oLJ0aRbztQdoLFzGFnnAaed9r+rsivL2RPEg6NqWgMr AIZ2vBA6dk0Cobf6GnmjS9yd2oLTM8e5sgIvyebhbQgFNKXE+LlkoXJMIGp7kzs6W61B Zl/g== ARC-Authentication-Results: i=1; mx.google.com; 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 sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d5-20020aa7c1c5000000b00504b12905c3si16614758edp.674.2023.05.17.13.40.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 13:40:22 -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; 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 D38733856973 for ; Wed, 17 May 2023 20:40:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (unknown [IPv6:2a02:c207:3003:236::1]) by sourceware.org (Postfix) with ESMTPS id 2689C3858D1E for ; Wed, 17 May 2023 20:39:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2689C3858D1E 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 Received: from mx3210.localdomain (unknown [142.181.186.176]) by dellerweb.de (Postfix) with ESMTPSA id 4FAF71600359; Wed, 17 May 2023 22:39:50 +0200 (CEST) Received: by mx3210.localdomain (Postfix, from userid 1000) id 15C2C22012C; Wed, 17 May 2023 20:39:47 +0000 (UTC) Date: Wed, 17 May 2023 20:39:47 +0000 From: John David Anglin To: GCC Patches Subject: [committed] hppa: Add clear_cache expander Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-8.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.29 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766175301307365465?= X-GMAIL-MSGID: =?utf-8?q?1766175301307365465?= Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- Add clear_cache expander. 2023-05-17 John David Anglin gcc/ChangeLog: * config/pa/pa.md (clear_cache): New. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 7b7d7f776c7..726e12768f8 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -9940,6 +9940,23 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" [(set_attr "type" "multi") (set_attr "length" "52")]) +(define_expand "clear_cache" + [(match_operand 0 "pmode_register_operand") + (match_operand 1 "pmode_register_operand")] + "" +{ + rtx line_length = gen_reg_rtx (Pmode); + + emit_move_insn (line_length, GEN_INT (MIN_CACHELINE_SIZE)); + if (TARGET_64BIT) + emit_insn (gen_icacheflushdi (operands[0], operands[1], line_length, + gen_reg_rtx (Pmode), gen_reg_rtx (Pmode))); + else + emit_insn (gen_icacheflushsi (operands[0], operands[1], line_length, + gen_reg_rtx (Pmode), gen_reg_rtx (Pmode))); + DONE; +}) + ;; An out-of-line prologue. (define_insn "outline_prologue_call" [(unspec_volatile [(const_int 0)] UNSPECV_OPC)