From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id A1191386F82E for ; Wed, 22 Apr 2020 06:31:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A1191386F82E Received: by mail-pl1-x629.google.com with SMTP id f8so552477plt.2 for ; Tue, 21 Apr 2020 23:31:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Yvs+jDMlztJFPt5LzfczyrUzcW5qABLRNQxvKGI4VrM=; b=dmGXfa5Qs/a1KxRkkmQKNxu31b4yTBhcaeWv7caWC2Ea5VQVxXX53A15oAVinURucV q2WV2aPD5W8jPjFsseAZXYT8/QRPOtz6tjEyZoRjkSGWWGFg4aR1UwTd2O09/Y09WzPh wrpyx1LIqNIliIbYmxPs8RhezTMue4qXx/TEkUWrl9vexNQpAqa/qYyzPKH9rtpNnXyQ kTcFF9KolnyLdNH4RbnsvsnxKgth/Z5gC3LUiYSgOXWlWtM7cWXkkye983mJfuG25/UW 6AwhlClXLZx1JVSkhjQ+QD2vcBb1u3mUdvYJeZIu7nz1ud6/03X/2cclIbPvLolTv0Od SEsg== X-Gm-Message-State: AGi0PuYYClZFJU5bCFsDGa3oFXb2KDEHAMN6vleasm1gvHjL+ulWKtZ0 EcPCZkSSw+KvHrv+3dUUAms= X-Google-Smtp-Source: APiQypKuGcETuyIq4RG/HZlsaI7LvJV6ngILV0Zr6Un5OwN9MLfxRx6PweQUn2wRwKHWETGX/t9f7w== X-Received: by 2002:a17:90a:4ce5:: with SMTP id k92mr687845pjh.192.1587537108752; Tue, 21 Apr 2020 23:31:48 -0700 (PDT) Received: from localhost ([203.185.249.170]) by smtp.gmail.com with ESMTPSA id y184sm4443556pfg.127.2020.04.21.23.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 23:31:48 -0700 (PDT) Date: Wed, 22 Apr 2020 16:29:19 +1000 From: Nicholas Piggin Subject: Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2 To: Rich Felker Cc: Adhemerval Zanella , libc-alpha@sourceware.org, libc-dev@lists.llvm.org, linuxppc-dev@lists.ozlabs.org, musl@lists.openwall.com References: <20200416153756.GU11469@brightrain.aerifal.cx> <4b2a7a56-dd2b-1863-50e5-2f4cdbeef47c@linaro.org> <20200416175932.GZ11469@brightrain.aerifal.cx> <4f824a37-e660-8912-25aa-fde88d4b79f3@linaro.org> <20200416183151.GA11469@brightrain.aerifal.cx> <1587344003.daumxvs1kh.astroid@bobo.none> <20200420013412.GZ11469@brightrain.aerifal.cx> <1587348538.l1ioqml73m.astroid@bobo.none> <20200420040926.GA11469@brightrain.aerifal.cx> <1587356128.aslvdnmtbw.astroid@bobo.none> <20200420172715.GC11469@brightrain.aerifal.cx> <1587531042.1qvc287tsc.astroid@bobo.none> In-Reply-To: <1587531042.1qvc287tsc.astroid@bobo.none> MIME-Version: 1.0 Message-Id: <1587536847.k87ypbo53k.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, SUSPICIOUS_RECIPS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 06:31:51 -0000 Excerpts from Nicholas Piggin's message of April 22, 2020 4:18 pm: > If we go further and try to preserve r3 as well by putting the return=20 > value in r9 or r0, we go backwards about 300 bytes. It's good for the=20 > lock loops and complex functions, but hurts a lot of simpler functions=20 > that have to add 'mr r3,r9' etc. =20 >=20 > Most of the time there are saved non-volatile GPRs around anyway though,=20 > so not sure which way to go on this. Text size savings can't be ignored > and it's pretty easy for the kernel to do (we already save r3-r8 and > zero them on exit, so we could load them instead from cache line that's > should be hot). >=20 > So I may be inclined to go this way, even if we won't see benefit now. By, "this way" I don't mean r9 or r0 return value (which is larger code), but r3 return value with r0,r4-r8 preserved. Thanks, Nick