Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3862248yba; Tue, 7 May 2019 08:13:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOH2fldCIFf+BvvGPICgIlyAgOpaQcnEXmEmsdThm4fXVLSkXael/CE5cFC2Lb/d9N3wp+ X-Received: by 2002:a63:8449:: with SMTP id k70mr39851156pgd.53.1557242008976; Tue, 07 May 2019 08:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557242008; cv=none; d=google.com; s=arc-20160816; b=w7hiRDAHsrKxo8IRqrylmBx1HNPWFnu3CYTvxBjGnY5N1rr0l8eLqG1VxQHDkjCSXJ S4a0xkyrJpsQO26nXDPQBwg2vYtHNqkP2zT3PpHa3/sH9J09DDPYz4OKhWunw3A+TXUW m67SwSDniv5lqRYTMsORPdTV0TcHkpFuflaxSehVQxDVAFICk7B7Aoc21W8l1nK/Zdlw z2rcmZqv4oAqMTYqy7dvPY1F/p8WiBXUZcs4PAkjpvbRnZ3PVzPLqJM7Ug7Lh1PVLHVo MfVfO9WCu7VSnxhgH445f86WFzzm6cUKpFt5Wc8IoteU+VeiBeJ5UeYZfAYOqwdTKouN VzaQ== 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; bh=b1SWmVc/3yMCyUkIBcz5+JG7Z58RlCDT0vV7H+8Q3NY=; b=H9mizWVd8ojsTk+aGxR35EW0EPj3eYiQurR0XIYFJLUqWrOeRQAV1xdk3Ah7UWtp6B ajnvyzjnK8jrSn9deV2ldlEN/MWlBYTgF9P+U+61LXgcrHvrVtl+OSJ0/0oCdfCAUydP Mr0MHra1YriPX8N4eN1suxCrEn3c5/e7Loz3o6YqFNS1ddzHCis1BYN7d68HD6ordUuL V/H5VcDzo5930+uXDuGn+QjMrwKZSBYdWjGagFgHG0ZrvELVfiZEh01Lvo9u8DyAbRF/ zeFjkWZx+ZXPNdHSm6pk91FUso/wV6pBXi2UJDION8zfFw1+oXj7kR75MOUWzhKd24GT RZZg== 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 cd16si21119887plb.336.2019.05.07.08.13.11; Tue, 07 May 2019 08:13:28 -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 S1726980AbfEGPK5 (ORCPT + 99 others); Tue, 7 May 2019 11:10:57 -0400 Received: from gate.crashing.org ([63.228.1.57]:44656 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726324AbfEGPK4 (ORCPT ); Tue, 7 May 2019 11:10:56 -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 x47FAVVb020331; Tue, 7 May 2019 10:10:31 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x47FAUGu020324; Tue, 7 May 2019 10:10:30 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 7 May 2019 10:10:30 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc: slightly improve cache helpers Message-ID: <20190507151030.GF8599@gate.crashing.org> References: <0b460a85319fb89dab2c5d1200ac69a3e1b7c1ef.1557235807.git.christophe.leroy@c-s.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0b460a85319fb89dab2c5d1200ac69a3e1b7c1ef.1557235807.git.christophe.leroy@c-s.fr> 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 Hi Christophe, On Tue, May 07, 2019 at 01:31:39PM +0000, Christophe Leroy wrote: > Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers > that are summed to obtain the target address. Using '%y0' argument > gives GCC the opportunity to use both registers instead of only one > with the second being forced to 0. That's not quite right. Sorry if I didn't explain it properly. "m" allows all memory. But this instruction only allows reg,reg and 0,reg addressing. For that you need to use constraint "Z". The output modifier "%y0" just makes [reg] (i.e. simple indirect addressing) print as "0,reg" instead of "0(reg)" as it would by default (for just "%0"). Segher