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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BB50C4338F for ; Sat, 31 Jul 2021 00:02:29 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4511560EC0 for ; Sat, 31 Jul 2021 00:02:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4511560EC0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Gc4Ft4CPRz3cmd for ; Sat, 31 Jul 2021 10:02:26 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=permerror (SPF Permanent Error: Unknown mechanism found: ip:192.40.192.88/32) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4Gc4FT34pZz3bnC for ; Sat, 31 Jul 2021 10:02:03 +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 16UNtuUP004776; Fri, 30 Jul 2021 18:55:56 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 16UNtsHB004775; Fri, 30 Jul 2021 18:55:54 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 30 Jul 2021 18:55:54 -0500 From: Segher Boessenkool To: Nick Desaulniers Subject: Re: [PATCH] powerpc/vdso: Don't use r30 to avoid breaking Go lang Message-ID: <20210730235554.GJ1583@gate.crashing.org> References: <20210729131244.2595519-1-mpe@ellerman.id.au> <392b3b47-1878-d27a-9656-4596fdc7c343@molgen.mpg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nathan Chancellor , Paul Menzel , linuxppc-dev@lists.ozlabs.org, clang-built-linux@googlegroups.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Jul 29, 2021 at 09:25:43AM -0700, Nick Desaulniers wrote: > On Thu, Jul 29, 2021 at 6:42 AM Paul Menzel wrote: > > Am 29.07.21 um 15:12 schrieb Michael Ellerman: > > > Note this only works with GCC, clang does not support -ffixed-rN. > > > > Maybe the clang/LLVM build support folks (in CC) have an idea. > > Right, we've had issues with these in the past. Generally, we need to > teach clang about which registers are valid for `N` so that it can > diagnose invalid values ASAP. This has to be done on a per arch basis > in LLVM to steal the register from the register allocator. For > example, this was used previously for aarch64 (but removed from use in > the kernel) and IIRC is used for m68k (which we're working to get > builds online for). In GCC, it is -ffixed-* (note: no "r"). The string is stripped of the standard prefix for the target (for Power, none), and possibly of one "%" or "#". If the string is a recognised register name (or alternative register name) for the target, that is used. If not, and it is a decimal number, then the internal GCC register of that number is used (these numbers can differ from one GCC release to another, and in fact we have changed the numbering for Power before -- but 0..31 have always been the GPRs, and 32..63 have always been the FPRs). The names for the Power registers are: GPRs: 0..31, or alternatively r0..r31 FPRs: 0..31, or alternatively fr0..fr31, or alternatively vs0..vs31 VRs: 0..31, or alternatively v0..v31, or alternatively vs32..vs63 CR fields: 0..7, or alternatively cr0..cr7 (There are more, but changing the default calling convention for those will not work anyway. Also, some non-Linux configurations use different names.) Segher