Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp66507rwl; Thu, 6 Apr 2023 14:56:34 -0700 (PDT) X-Google-Smtp-Source: AKy350biU6Gw/l+D5tF/SElBdGOCRHAKzrSeD61Wetr+ahHGna/VB+TAcMAL3wfppdia3OzhS/l2 X-Received: by 2002:a17:90b:4ace:b0:23b:35f6:4ee6 with SMTP id mh14-20020a17090b4ace00b0023b35f64ee6mr148857pjb.3.1680818194353; Thu, 06 Apr 2023 14:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680818194; cv=none; d=google.com; s=arc-20160816; b=Uwl68Fhk6nYlN0v3bRGlxymR48sLzWHo7YvJ6LVXhWNMm8mbAdmJEzTU4Wf173IT8P QHQ5DDSI7YUvv0XzVu1pNU6xC3531VJNEHHFsyamQehsTX0aUNAzDiGvSfZ1NiFXHixz ezxa7Aiq6fgQo3YOW0Rzwp52LNnbSEXuLRd4xViwkboyOfiss477MndTM1EfJdv4UnO5 3wbp6gDCGll/hax77z261L040lZeDCsgnKa6VLMu3yt4ursXS4D2krgtp3/CWOOUbDt7 p0mGI/wHAGjOz8St7ngTbbCsB5OUykft00dcVmP11ta6ScPhirJGagtWZjrgyT+A9gTq 1oCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=d8bwNWYnN0jcN3r9OkbTE1wmYrZZ4mFaiQ/PG4MPhk4=; b=kO4UJYD4w73WsrxbHaKqkuWuZFlBqkSDc+q7oIG48ITNp+Y9B748+S+KXlqyIRjt0R tZvgqVWO7a4txXTfdjqMz275vGcx+AD6msCeGus4cIv70OZ8VtT4o4lJWcvPQEe6gYTE e48pyrora0CaERJZLBsiXP4W5rcO/WZAUJ0rngEXE4tiTALWp0Hw1hVFRm4cIbSOiWt6 aT2uPoXmqND+Y83XDKEjsCKupGHFqVgrGEGihUZ9TjpnPTTfmiXDerDH2l+HdJHLOYrH Hj7ogb+FpOp+HHypqpq6DNzNyd3W54wP7+oWw1gYkBedP4CJozVswR8Xp9w7Fi+Jnjf6 Brhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=knWR5xTc; 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 qe17-20020a17090b4f9100b00233fe9ab99bsi5049919pjb.130.2023.04.06.14.56.22; Thu, 06 Apr 2023 14:56:34 -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; dkim=pass header.i=@weissschuh.net header.s=mail header.b=knWR5xTc; 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 S239281AbjDFVzQ (ORCPT + 99 others); Thu, 6 Apr 2023 17:55:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236370AbjDFVy7 (ORCPT ); Thu, 6 Apr 2023 17:54:59 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F95A5FF; Thu, 6 Apr 2023 14:54:58 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1680818094; bh=Rf7Jc56HjkpWDXljnPpY5bO94Kjcb/DhOAnDyw2YeEs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=knWR5xTcOlKFmcstTjTjzwApExaXWn9NSBrkqKAWsEJSeW5cnYUTZ04QJslMoL/MB l0L6bscC6c9V/rD502l7smuFCU5v5R8guvoESxeSkfYj3Xl/tzhpkX9PyYTUwp7Hg0 w2RhXnhqDkTYmpuYZ0T9JQfGlRv5y7PPedhUif3g= Date: Thu, 06 Apr 2023 21:54:53 +0000 Subject: [PATCH v2 07/11] tools/nolibc: arm: use C89 comment syntax MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230328-nolibc-c99-v2-7-c989f2289222@weissschuh.net> References: <20230328-nolibc-c99-v2-0-c989f2289222@weissschuh.net> In-Reply-To: <20230328-nolibc-c99-v2-0-c989f2289222@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1680818091; l=3900; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Rf7Jc56HjkpWDXljnPpY5bO94Kjcb/DhOAnDyw2YeEs=; b=YwG20llV8yOPYg5+PPSwm+Ukx9mn6MnyiPWyK7kOfNaoTB57yX1mRwtVZw7dwhGZG4Tp6pv8w SLMFUB9v5FvCaHdplAPl4PWYUNXfYo7ONwRjPNPAxSdO6C6ENl7+lfo X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 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 Most of nolibc is already using C89 comments. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/arch-arm.h | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tools/include/nolibc/arch-arm.h b/tools/include/nolibc/arch-arm.h index 42499f23e73c..9fc926f5fbae 100644 --- a/tools/include/nolibc/arch-arm.h +++ b/tools/include/nolibc/arch-arm.h @@ -203,34 +203,34 @@ const unsigned long *_auxv __attribute__((weak)); void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) _start(void) { __asm__ volatile ( - "pop {%r0}\n" // argc was in the stack - "mov %r1, %sp\n" // argv = sp + "pop {%r0}\n" /* argc was in the stack */ + "mov %r1, %sp\n" /* argv = sp */ - "add %r2, %r0, $1\n" // envp = (argc + 1) ... - "lsl %r2, %r2, $2\n" // * 4 ... - "add %r2, %r2, %r1\n" // + argv - "ldr %r3, 1f\n" // r3 = &environ (see below) - "str %r2, [r3]\n" // store envp into environ + "add %r2, %r0, $1\n" /* envp = (argc + 1) ... */ + "lsl %r2, %r2, $2\n" /* * 4 ... */ + "add %r2, %r2, %r1\n" /* + argv */ + "ldr %r3, 1f\n" /* r3 = &environ (see below) */ + "str %r2, [r3]\n" /* store envp into environ */ - "mov r4, r2\n" // search for auxv (follows NULL after last env) + "mov r4, r2\n" /* search for auxv (follows NULL after last env) */ "0:\n" - "mov r5, r4\n" // r5 = r4 - "add r4, r4, #4\n" // r4 += 4 - "ldr r5,[r5]\n" // r5 = *r5 = *(r4-4) - "cmp r5, #0\n" // and stop at NULL after last env + "mov r5, r4\n" /* r5 = r4 */ + "add r4, r4, #4\n" /* r4 += 4 */ + "ldr r5,[r5]\n" /* r5 = *r5 = *(r4-4) */ + "cmp r5, #0\n" /* and stop at NULL after last env */ "bne 0b\n" - "ldr %r3, 2f\n" // r3 = &_auxv (low bits) - "str r4, [r3]\n" // store r4 into _auxv + "ldr %r3, 2f\n" /* r3 = &_auxv (low bits) */ + "str r4, [r3]\n" /* store r4 into _auxv */ - "mov %r3, $8\n" // AAPCS : sp must be 8-byte aligned in the - "neg %r3, %r3\n" // callee, and bl doesn't push (lr=pc) - "and %r3, %r3, %r1\n" // so we do sp = r1(=sp) & r3(=-8); - "mov %sp, %r3\n" // + "mov %r3, $8\n" /* AAPCS : sp must be 8-byte aligned in the */ + "neg %r3, %r3\n" /* callee, and bl doesn't push (lr=pc) */ + "and %r3, %r3, %r1\n" /* so we do sp = r1(=sp) & r3(=-8); */ + "mov %sp, %r3\n" - "bl main\n" // main() returns the status code, we'll exit with it. - "movs r7, $1\n" // NR_exit == 1 + "bl main\n" /* main() returns the status code, we'll exit with it. */ + "movs r7, $1\n" /* NR_exit == 1 */ "svc $0x00\n" - ".align 2\n" // below are the pointers to a few variables + ".align 2\n" /* below are the pointers to a few variables */ "1:\n" ".word environ\n" "2:\n" -- 2.40.0