Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp66690rwl; Thu, 6 Apr 2023 14:56:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bI0mBF8IC0WfFWar8DZvNTyQf3szpX3GjQIy1T3WFBpav2YuvtkaXabypHqRVRZMaLLu+G X-Received: by 2002:a62:7b8d:0:b0:5ce:ef1b:a8b with SMTP id w135-20020a627b8d000000b005ceef1b0a8bmr222179pfc.30.1680818212886; Thu, 06 Apr 2023 14:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680818212; cv=none; d=google.com; s=arc-20160816; b=d4q2vTEGhLNAoYgX5+zIyrD/mOQ/40dcjZd41uGyY53ycehRbpx6NAG9AFKcfOblKP //0yMoRoSYtxsDWp5YaKvQ6KHy/utPypP2RmrZ0M8S4OMUy6KNa3xZzyDsmc1mtnVowi wMeuajEV7jiYP8lAFK/HmB9BWhyt5Ng6Mhf1bC1jMEyxOd6mAoWOTigDvSeru5FNCMQB tt2FhuVHRIKa8y5eaWQ7AeyOEzq1bCDv7yFD5h6D/eDboLjY3mo2hIcrhdZ1eC7yrOWw mLFPDJ6DuI4LOkAHB0Om+CZhgSCTMO1a6dbixJXnciGROEJPuUkZoNKopWsirPYmu6h/ C3YQ== 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=fTZ3Ck1gIBKPUhmmKHwiTXO+aao2sw3BPU+LqJdTCjI=; b=UIr1EEN8TfMxjLVxfWgqT2zune1DIHLuK+jZuNPxbtzBUBbGbWxaeTPthIOyJCXW96 eFrJnwr1C95ptkEOd8WFR+kmNNA5vqoSZNJutHq9fGC+Q4n5jYE703PcTWY1SVDyF7wK 9gYcelifsP9EXlBt01wDGih7v4J/0HfQcfoTPYwsMj9oQboHdd14n6krLtAD913FS7QG w1R7ji+q/fFW2oBViNF2sjAwsrA+WYFggpJB4n8o8TBiE2BhWUGC3W5NKO5xuRzn77Pk iPDeq504kjxbtMpbH0+USU+taAV1CK4uwpcwClBtOUy1AR5EJ/6jdGf5kfwJis2TRy3H bm2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Al7o5EBh; 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 o25-20020aa79799000000b0062a3f8af23bsi2201179pfp.323.2023.04.06.14.56.34; Thu, 06 Apr 2023 14:56:52 -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=Al7o5EBh; 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 S238786AbjDFVzG (ORCPT + 99 others); Thu, 6 Apr 2023 17:55:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231411AbjDFVy5 (ORCPT ); Thu, 6 Apr 2023 17:54:57 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 863C0AD02; Thu, 6 Apr 2023 14:54:55 -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=1680818092; bh=OcgnK0Ms7iKUc3TQe2cs92M6mnXoTMxMYhUD6BUEzjE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Al7o5EBhk9fVdcBzYPZEdaPJHwKO2ORtiubgQZ+/zeKtZH6A0vekJi37Qe1qWNhcX BWroDIsn/txxYpbjETqAP/Ac7n8RyicjGXxEpnC9/6ey/4FNmPKbKEsvX/Mt1bHOkK 0p8qAjfC4Opqv6OzMwTji3UZvGD7bwYMUnH2b1uw= Date: Thu, 06 Apr 2023 21:54:47 +0000 Subject: [PATCH v2 01/11] tools/nolibc: use standard __asm__ statements MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230328-nolibc-c99-v2-1-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=1491; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=OcgnK0Ms7iKUc3TQe2cs92M6mnXoTMxMYhUD6BUEzjE=; b=/tLhsCm0o1ql7hDEB3NMPFg2Mw9aY+TDPxcepfXwZ3cfGVm7hLaY7Gftn6wrO02BFbkXeIaOh 4A+bOEa+Bq1BrgsxG2EClk9aWzQio0erKF1n/E6RFFmCOx/zDQXvZu/ 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 the code was migrated to C99-conformant __asm__ statements before. It seems string.h was missed. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/string.h | 4 ++-- tools/testing/selftests/nolibc/nolibc-test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/include/nolibc/string.h b/tools/include/nolibc/string.h index fffdaf6ff467..0c2e06c7c477 100644 --- a/tools/include/nolibc/string.h +++ b/tools/include/nolibc/string.h @@ -90,7 +90,7 @@ void *memset(void *dst, int b, size_t len) while (len--) { /* prevent gcc from recognizing memset() here */ - asm volatile(""); + __asm__ volatile(""); *(p++) = b; } return dst; @@ -139,7 +139,7 @@ size_t strlen(const char *str) size_t len; for (len = 0; str[len]; len++) - asm(""); + __asm__(""); return len; } diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 888da60eb5ba..e692be98973a 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -984,7 +984,7 @@ int main(int argc, char **argv, char **envp) #else else if (ioperm(0x501, 1, 1) == 0) #endif - asm volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0)); + __asm__ volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0)); /* if it does nothing, fall back to the regular panic */ #endif } -- 2.40.0