From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 196261F45E for ; Tue, 11 Feb 2020 19:17:15 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=xXPGRLEoetEOwPD2 4gNGtKRMj9tZolW4AjWArzEEctO2rduQSNGLmSCmeZj94EKSaq3akUX7R4Eo5h0J OzzCDmlQIMsFftUa/NgCO68tTYNNWxcnTqXoZ/H/CWM2WrkuhM6N9hrxn3/shCzt fL3tMYGN2t5cM5d29X5sIHe4tUM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=+j9r30M80C42bVaQnVJhmY c5GOM=; b=WX9oBW5e0CgdLR8gLW4yZkVq1xZhhehOF5iBD/iWEkjmAEIAGx2BcF up8eq6YwV0A4PJr29UxpsiOAEASC8TUaGA4AMjBeZt0I37IlvJrFvKQqoBGoiJS8 gciVEiFiRN6D7x1etrEv6lgp6CrgaiufWhI1a+DUdPjYTqtr0/WOw= Received: (qmail 78102 invoked by alias); 11 Feb 2020 19:17:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 78094 invoked by uid 89); 11 Feb 2020 19:17:12 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qv1-f66.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uZq8lYsrojnrNri1e6nehRHxGAmiErmR4WdiKA2mvuM=; b=UNe5sMRQemK0iKVB/+KxuShQnNLoUXSojztbkgKgedJNiH2eXK20IWOyPN8oOCJLnv AQ+dn0YfHV63wvVh0J5Ty/gwZgsf7PxSJwXWQbznCaRUa/wecFZmskTgrCNECVz1NR4G KBS7zneUlj3sfhMh4hP9HZdPD7aOk3cYo7ZczM2DanmRcxmJHVDgtopHXMVWORPx6cNw 2HvTwlgspHezIagoV8K2zDF6JRgxJfYPGcLbl4Pe4+poAOTFPx7SXbI6WXJWCBK/I+kX fhnvXuWNZIQ76vV2p0A9+07x8+BraYl8ECHMbojxIVg9A4gHmAc2IRDiVcnF5T7T4GZo QWSQ== Subject: Re: [PATCH 12/15] sparc: Avoid clobbering register parameters in syscall To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20200210192038.23588-1-adhemerval.zanella@linaro.org> <20200210192038.23588-12-adhemerval.zanella@linaro.org> <87r1z1nzat.fsf@oldenburg2.str.redhat.com> From: Adhemerval Zanella Message-ID: <631211a8-76ad-582d-7386-34f7dfa8baa3@linaro.org> Date: Tue, 11 Feb 2020 16:17:05 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <87r1z1nzat.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 11/02/2020 08:22, Florian Weimer wrote: > * Adhemerval Zanella: > >> The sparc INTERNAL_SYSCALL macro might clobber the register >> parameter if the argument itself might clobber any register (a function >> call for instance). >> >> This patch fixes it by using temporary variables for the expressions >> between the register assignments (as indicated by GCC documentation, >> 6.47.5.2 Specifying Registers for Local Variables). >> >> It is similar to the fix done for MIPS (BZ#25523). > > (bug 25523) for the bug reference. You may also consider switching to > long int instead of long, given that you change most of the code anyway. > Otherwise looks good. Ack I have changed to long int on my local branch.