From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5AA79C77B7C for ; Tue, 24 Jun 2025 13:33:39 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4bRQrd4ctZz2xlK; Tue, 24 Jun 2025 23:33:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750772017; cv=none; b=ceYe4oQgoIPmqhY7Bnna5kLXzrGrsC1hB6tVzj/ZhKWsBtevk0q4FBDbfiNNBO0a8sy1BH+kufsr2sl7Usean4RzdT+wpQmOB3n+kjjhOSmzfDvHZmAwGF6YchiWEuazjRGKYI8f75d3A9ZiXLADYyHr1/5niZPX9LhZEXo82c6VB9l8vgih/d+jZlRox5m9vRwpFWS3fHuB3/n8ynbupqmc32JDNzPfJeyJy0Vo7DTvp67pL+u2WQIzDCnsyVnT87C3nj5DshbjR4FYYgGCXgUk/e78lAt4uexQ5SLhS+Fl8laYdh6J/MN1TaygmtfYgvySgjA0AiefH27Mp6KFSQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750772017; c=relaxed/relaxed; bh=691ttiBDJIdkODJscPLuyaSKn7jnRfewEk9Xj2GdrD4=; h=Date:From:To:Cc:Subject:Message-ID:References:Mime-Version: Content-Type:Content-Disposition:In-Reply-To; b=HBFbjcK0HstDCelL1tQAwJnkju78wZarplMspTAfjZXu7z1Evha0Vyd+PyJdZ9CI6Le6t08aPV1yKGyuhCMY4dC4VivbIq3fF9Sig422aIvkkgNl6DTXhzt08D0YcxRaZgEqQFjoWwL6RbAJETr1Va7Z2BTmkq1VI9XHGJxR4bfgP6BKUvaAHXtRueVPIUryVcHS7UaVYvKP9wdC9cfJaUvdGSzJbwsd/qMyp7cUdeeR95IEnODdJZQ5jBxVj/fSzoK1v/0u+VyTbuLJfrbA0Nf/goasdKlJJFm3fGkdO4d2YDQ8eFhrPfo/NGeioXOUvk0NRp8fMXgv5kWE3/W31g== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org; spf=pass (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.crashing.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=lists.ozlabs.org) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4bRQrb427Cz2xk5 for ; Tue, 24 Jun 2025 23:33:33 +1000 (AEST) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 55ODHH69017475; Tue, 24 Jun 2025 08:17:17 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 55ODHFe6017474; Tue, 24 Jun 2025 08:17:15 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 24 Jun 2025 08:17:14 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: David Laight , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Madhavan Srinivasan , Alexander Viro , Christian Brauner , Jan Kara , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Andre Almeida , Andrew Morton , Dave Hansen , Linus Torvalds , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 0/5] powerpc: Implement masked user access Message-ID: <20250624131714.GG17294@gate.crashing.org> References: <20250622172043.3fb0e54c@pumpkin> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i On Tue, Jun 24, 2025 at 07:27:47AM +0200, Christophe Leroy wrote: > Ah ok, I overlooked that, I didn't know the cmove instruction, seem > similar to the isel instruction on powerpc e500. cmove does a move (register or memory) when some condition is true. isel (which is base PowerPC, not something "e500" only) is a computational instruction, it copies one of two registers to a third, which of the two is decided by any bit in the condition register. But sure, seen from very far off both isel and cmove can be used to implemente the ternary operator ("?:"), are similar in that way :-) Segher