Received: by 2002:ac8:4602:0:b0:405:464a:c27a with SMTP id p2csp2531446qtn; Tue, 25 Jul 2023 11:24:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlH1Sivd3lpTGF+d4FQy9ubgoSXpY1kHbvTbskB52cALqYMaU312Hjqq8iSh5ltNeWw48pFh X-Received: by 2002:a17:906:10db:b0:993:e860:f20 with SMTP id v27-20020a17090610db00b00993e8600f20mr15482430ejv.19.1690309479313; Tue, 25 Jul 2023 11:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690309479; cv=none; d=google.com; s=arc-20160816; b=FqKBAIMPPiFu/o7s59U8jpS1volxExIXuTGy28ZBOlEJK7BsuM4XEixcxV+/BAn/1w Fz/3ZJyxp/UolzObTRcd785gSkIldhuqxqR1O+hQasaCV7Gc0RWXWYKsVNP5Pt7jZNkL kD6p6eF6uz28nI70UK4A6E9y8JYenE6VAbM64CvGR5uuYh6djWtXCzrTiDv+XTQTa2Kr ucDBgWyFd/3n39Es+KxqXfnRbgBOEnCAaM5aNXe3+Gq+0Ln/yo1AoHW+XLwMLXcubQwz xyj7ygmrHdFiQWXLSMUqNU0DLeIg2F8uw4masn5ThY9x3UnmXd482oI/c8dkpnhRyiCZ ppNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=sMyCruCFYrkPVT3Pf5aTYk+20b4cgldIRAJS8ov3Hk4=; fh=TPoumrGPx5sjth9dmU9JwLU/Qp4Wx6N/4WWbanZNfcc=; b=hV1FGmYJW6tzlJtMOIQUyksDyI0wWZKwQYF7q8V1tFze/e610y4HRLLagNTr5pPIjS 6oPGfANfncmqn3xqtk8L3c+hPjcbjhO3n3XJX6AJshyUbtbYqENN6Cul2EVxg0QEyF4O SZ3EXfZjLM1cL3iT1QZY4M/dcaCgDZkQI+o5QSl/Z4A5MVc0vlfMwosaR/+goxPaVHDB iFAHiQiBIkiltz5B36749YHBkNgo6MzzRB2o0lAiDkI5PXQ0Ikv8Y7Dnefkdu1iI3vto UoU+ydmgXDJoZTXfw35CPM1pR3UVWdXN8EMQHavzkj4p8cxuCD6w2V95gKYXzy5xhlcL yMOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a17090671c800b00988d6a7cdefsi8593458ejk.212.2023.07.25.11.24.15; Tue, 25 Jul 2023 11:24:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232471AbjGYREv (ORCPT + 99 others); Tue, 25 Jul 2023 13:04:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232488AbjGYREu (ORCPT ); Tue, 25 Jul 2023 13:04:50 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAF05FE; Tue, 25 Jul 2023 10:04:47 -0700 (PDT) X-QQ-mid: bizesmtp66t1690304667tqzlii4e Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 26 Jul 2023 01:04:26 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: v5d6m16HONVi2D/QeLQOKtGgpX/AUGXaSND1+kSKQFYjN89qSTQodb0JNIgXI 7n9GYT7eLSDNcJH3WFIoAh/0hSRRBispqoAeWGFym4zq4GXcs/6Tx4bi9gCoU6U6UpufbmJ MTsX8kYizOK95mlkYom5kOQ3qf321p/e2GXOJQLE4dbLfC/PkGpIA1en4InBENVY9TJm9jd skSjRif1qay3YsIAwBfrHbuWj2E74Q2Xb3ajnUmn/5trsbpv3BPcIkpJhsYWvPNJoGPhiBW kCYCuj2tf8qWGn46pC9oyZyy2YS7j2FgilnVjWysR5Ueo4K+w0hCLn0qZiy0pmQqtmse44s HbVvkr8yG1WoHFnALPKneWG0VfkUJzv64PmcABkQxi6MJWBqWmI+8ivGfPjDg== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 11331428478429360439 From: Zhangjin Wu To: ammarfaizi2@gnuweeb.org Cc: arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, svens@linux.ibm.com, thomas@t-8ch.de, w@1wt.eu Subject: Re: [PATCH v1 1/8] tools/nolibc: add support for powerpc Date: Wed, 26 Jul 2023 01:04:26 +0800 Message-Id: <20230725170426.58050-1-falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SORTED_RECIPS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Hi Zhangjin, > > On Tue, Jul 25, 2023 at 07:02:55PM +0800, Zhangjin Wu wrote: > > Btw, have checked "=r" instead of "=a" works on i386 too for we already > > bind the _ret variable with "RET" register, but still need to check if > > "=a" is necessary? > > I need to tell you that syscall6() for i386 can't use "r" and "=r" > because there was a historical bug that made GCC stuck in a loop forever > when compiling the nolibc code. It's already fixed in the latest version > of GCC, but we should still support older compilers. > Thanks very much, this information is really important. My old 'reply' is not rigorous, since the syscall6() uses stack to pass the 6th argument, so, our new syscall.h didn't support it currently, the syscalls I have tested about "=r" instead of "=a" were only syscall1-5(). > Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105032 > > I discovered that bug in 2022 in the latest version of GCC at that time, > so it's pretty new, and those buggy versions are very likely still in > the wild today. Ok, so, with the new syscalls.h proposed, we'd better keep i386 syscall6() as-is. For the left syscall1-5(), is there any risk when use '=r' instead of 'r'? Thanks, Zhangjin > > -- > Ammar Faizi