Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3273161imm; Thu, 17 May 2018 06:17:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrLnoEw4Pt/N1xYkwqPf4kY4Vfsehp0TVB8RkbQryDfi85aavF32ynpaAUdJ8CjzEsRg17u X-Received: by 2002:a63:7c55:: with SMTP id l21-v6mr4101682pgn.148.1526563063572; Thu, 17 May 2018 06:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526563063; cv=none; d=google.com; s=arc-20160816; b=MXpqcJ6zTZG3eox6arFoRh+yuYX8vHW4Hv585UKqdtA7V8l00chMRH30SpgtjkJPR0 F3b3941PUPjLj1soJT8OXDmInQZ77kPC5ObrRAI3JpWo6o7gAzB2R3hSQVSuxXfi+M7R KZL+RNJfPOh9eK/YsOSwuARNnY5m74a4vRwwiC9HAwv5n27dwaa0r56uzXWAtVLknwd0 3izLMU0QT1ckM+B/puTrTed9aeQbwrKQnlAk7+ppJ5ctTovjdHXRrd6c/lqkiNLEh9CR jYEeQhdtu5PoaRYYE3gC3fuKkZ+x721jKPkMJ8Jehn8aAM1oo34lrk7TkQsFM0FhOXSF NyKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Mc2rNDbNx5BPXeQ9EDG5OCDjsCuzyN/6XkgVXFLLlPI=; b=WbRY8jgGzPqXOyz8tdnygwvc1IFNVUwym0ZdLp5OxqRktSKI65MfDedKI/K0EWCgrK NiAi6iA8mCWdcEIcQGVnbjuqgkjNPNqlv/CZuIB+qNKW93SGkCjQgwEFQTXbksuy9jQ1 8HtlmSuv5OGszdOVjcK36xPD0IWnAz0ZZTV2PlcUTdRP9/0YGOnaz0ZZClqUSF3W52vy H4gaU9iY3jEzvKWW0zn97JE0nqFf7cE2FCOnL5QY3yX91w7CizdAq+Ys15CRInEmXuXy U7O+MHF+CIZcaQ/wQcuEdVV7V0Hts1lwZbTSHNNVAY+9vF321I6WeUoVGAUUaIy9zCQ2 qFFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14-v6si3971618pgd.684.2018.05.17.06.17.28; Thu, 17 May 2018 06:17:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752200AbeEQNQo (ORCPT + 99 others); Thu, 17 May 2018 09:16:44 -0400 Received: from gate.crashing.org ([63.228.1.57]:33667 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbeEQNQm (ORCPT ); Thu, 17 May 2018 09:16:42 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w4HDFu2d001701; Thu, 17 May 2018 08:15:57 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id w4HDFodd001692; Thu, 17 May 2018 08:15:50 -0500 Date: Thu, 17 May 2018 08:15:50 -0500 From: Segher Boessenkool To: Michael Ellerman Cc: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] powerpc/32be: use stmw/lmw for registers save/restore in asm Message-ID: <20180517131550.GR17342@gate.crashing.org> References: <7fbae252f24ec4d30f52f57a549901fa3f799f8f.1523984745.git.christophe.leroy@c-s.fr> <87zi0ymqj6.fsf@concordia.ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zi0ymqj6.fsf@concordia.ellerman.id.au> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 10:10:21PM +1000, Michael Ellerman wrote: > Christophe Leroy writes: > > arch/powerpc/Makefile activates -mmultiple on BE PPC32 configs > > in order to use multiple word instructions in functions entry/exit > > True, though that could be a lot simpler because the MULTIPLEWORD value > is only used for PPC32, which is always big endian. I'll send a patch > for that. Do you mean in the kernel? Many 32-bit processors can do LE, and many do not implement multiple or string insns in LE mode. > > The patch does the same for the asm parts, for consistency > > > > On processors like the 8xx on which insn fetching is pretty slow, > > this speeds up registers save/restore > > OK. I've always heard that they should be avoided, but that's coming > from 64-bit land. > > I guess we've been enabling this for all 32-bit targets for ever so it > must be a reasonable option. On 603, load multiple (and string) are one cycle slower than doing all the loads separately, and store is essentially the same as separate stores. On 7xx and 7xxx both loads and stores are one cycle slower as multiple than as separate insns. load/store multiple are nice for saving/storing registers. Segher