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 453A11F619 for ; Thu, 27 Feb 2020 17:49:43 +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=Dxb6ObqZSuF/JM6K JFP5wfyhxgMZxkDDKHiaScb0SSiySsVb1fDm3/0eQuNm/Zs7OhOEzz+IxmAzXsHP sfeaasvuf/SNwjCsTU3EGanfBtK4VRXoQt/iYiXtj7XVqw+qsE4lV4teWV6fuAgp 2eUK/91JEU0BYauSfYfwlhR+RBw= 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=P0SCKTiHOWmtPEtrTg8EJa R5d4U=; b=b6JpvC2K1wupHirzU3El0cZBNTlhBjx978TbnZmT9rnJry/io1xgeq lFypgUuVDNmos4elp/+JhMH7OoYzfXduKzCYT/MyMBySKj6jvEJoPfMczJf1nchK GNK+bDMOHs7eX4zV20CX/DW0LM9A7uEcWE5GltJOi3OEAtBFvnaNU= Received: (qmail 94534 invoked by alias); 27 Feb 2020 17:49:39 -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 94436 invoked by uid 89); 27 Feb 2020 17:49:39 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qk1-f193.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=SH3pRLz3uXkm8XTYvNUsU1QRJpAEy6SLBg/eBWJbn4E=; b=f9/j0JvAYwA8DH04ypLme127rAzjT6eyxr9SPNZx0wLFD+4xtBnEiDNxLF02Hy55vE 5NxPqqsaIsIlKYlBW/KeEm3f7bC1Oc3J7CfAFx/oI6EbV4Z5orLpmwxEmDY0RoOYMleq NJ05fM9QhY8rX4q/030QZr35DyJmkjZT9SytwemyFlCIvKZjRQun1mKOxHDBIfZUYevs rWhTAAMSIPl6y8VLrDUCPsohuizxrAFaQ06+TmYv813GHXTs4bWlssKxfQVvGdG2b1Qc qYi/v51MeiNMAB1lVjmnJ8s6tyBw2d8sxQILtf6Q9oHBtOk+OPNOyxzQGNHEDZRC7WmF XlEQ== Subject: Re: [PATCH 08/15] nios2: Use Linux kABI for syscall return To: Vineet Gupta , "libc-alpha@sourceware.org" Cc: arcml References: <20200210192038.23588-1-adhemerval.zanella@linaro.org> <20200210192038.23588-8-adhemerval.zanella@linaro.org> <10265c86-aba3-12f9-9208-4a4c6ad31d28@synopsys.com> <4d32b8a1-e294-d2b7-f150-2c55281614ed@linaro.org> <8f88415f-18cc-17ef-91ca-b0dc101558d9@synopsys.com> From: Adhemerval Zanella Message-ID: <400b9721-cfbe-78f3-6cab-dd8d6a3115d1@linaro.org> Date: Thu, 27 Feb 2020 14:49:31 -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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 20/02/2020 18:04, Vineet Gupta wrote: > > Through a maze of defines this ends up calling INTERNAL_SYSCALL_RAW which seems be > unconditionally converting !0 value (success) into -ve and returning it. So won't > it convert a legit brk address return into a -ve and save in __curbrk. > On 2/20/20 12:39 PM, Vineet Gupta wrote: >> Am I not following this correctly ? > > Oh never mind, they use 2 seperate regs to convey syscall result and error, so > your code is right. > One of my goals is to disentangle the {INTERNAL,INLINE}_SYSCALL macros to consolidate their definitions and move the arch-specific bits to inline functions instead of macros. Another one is to remove the requirement to define similar assembly macros to be used by the auto-generated one. The idea is an architecture will just need to define a set of inline_syscall{0-6} functions.