From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63C8CC4741F for ; Tue, 10 Nov 2020 01:55:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 098C4206B2 for ; Tue, 10 Nov 2020 01:55:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mJgpiuAk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730690AbgKJBzz (ORCPT ); Mon, 9 Nov 2020 20:55:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728607AbgKJBzy (ORCPT ); Mon, 9 Nov 2020 20:55:54 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 411C9C0613CF for ; Mon, 9 Nov 2020 17:55:53 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id c20so9948132pfr.8 for ; Mon, 09 Nov 2020 17:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D1en5VjSPjbMPhawIIcRIlXt+Lt4izcOc7t6s2LqN7Q=; b=mJgpiuAk/LXqIpi7OXNbBVM23srYhWn/WrR/27ZAxqPogfEifGl+gVDX7HrzP02ffK WHkX5uOW/GGENK4m2YDZW6/3FKOu9mSCQrNIWNpqmJetMhw/3ctugW6UwkA5YkkAl30s cBXYzY3Un3D8OeT7BcIvdLOjaogNtcqCUQgvAA63W8TEszBNTvwAPUDr25/gE8RDl5UM ZEQXIEBxqgAt2KHYYstu3mvbzzH3mygheJTGtClh9mlvzBFHC7GEd2UKv4Y3GfR1bXX/ 87rmYvSNWHmNdQ3CNEGtFshXSRWqtKZrtxLimx2v/7eVSe8BVDCWEH6FiuI6EejjqA33 2v4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D1en5VjSPjbMPhawIIcRIlXt+Lt4izcOc7t6s2LqN7Q=; b=j916JcXqg8enG50rPXa/lzAP0TRQUa2QUGw70BMlhw+d+23ZBOqplgC5/CeElZEhK7 hhUODSwSx54aQRkt1Ez1gWWCpPRIlIxFhlHeoMllBxyKhjtY0sKIkcmRiW9LHkUVGOtP 4CutxV0gbyVaEtAwrpb0Sc/QtEgkyEMkPit9Gb00lJrVJpmTfesjcQSOI4D9O5OzgNFr U4okxCZg9QwhHoQzVk9DGfN7dpJ0srbY+yA+OI3mXaia+ThgietjbTt2+TPe0cWjGVYz fXFg0Ja7SoM15+u4oLshOAbSNI3M+ueMmTkEn7aAEk+c2MOSzVJjpLwln7o6MjK0mLpe CCvA== X-Gm-Message-State: AOAM531rfQlSKSXECmpBCFUQ0yZN3zAySTzwPVPC/xy7as5Vh0ktetkU y+lx3sbd6K7ksdqzTRT57VKgw5c9X/wpC0LJSNAdtA== X-Google-Smtp-Source: ABdhPJxjZ02jGzfuyRScXKwzi9zaxMiWV+n087kdRAervyAPm8llGHicBZxtZlxbTa8vg4x7tBWy2cNQM6IixZBZtyY= X-Received: by 2002:a17:90a:6b04:: with SMTP id v4mr2331926pjj.101.1604973352482; Mon, 09 Nov 2020 17:55:52 -0800 (PST) MIME-Version: 1.0 References: <20200409232728.231527-1-caij2003@gmail.com> <20201107001056.225807-1-jiancai@google.com> In-Reply-To: From: Nick Desaulniers Date: Mon, 9 Nov 2020 17:55:41 -0800 Message-ID: Subject: Re: [PATCH v2] Make iwmmxt.S support Clang's integrated assembler To: Ard Biesheuvel Cc: Jian Cai , Manoj Gupta , Luis Lozano , clang-built-linux , Russell King , Nathan Chancellor , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 7, 2020 at 12:29 AM Ard Biesheuvel wrote: > > On Sat, 7 Nov 2020 at 01:11, Jian Cai wrote: > > > > This patch replaces 6 IWMMXT instructions Clang's integrated assembler > > does not support in iwmmxt.S using macros, while making sure GNU > > assembler still emit the same instructions. This should be easier than > > providing full IWMMXT support in Clang. > > > > "Intel Wireless MMX Technology - Developer Guide - August, 2002" should > > be referenced for the encoding schemes of these extensions. > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/975 > > > > Suggested-by: Nick Desaulniers > > Suggested-by: Ard Biesheuvel > > Signed-off-by: Jian Cai > > Please make sure you test this carefully on BE32, as the instruction > byte order used by .inst is LE IIRC Unless that was a recent-ish change in GAS, it looks like I get the same disassembly/encodings before/after this patch for CONFIG_BIG_ENDIAN with GNU as. $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 defconfig $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 menuconfig $ grep BIG_ENDIAN .config CONFIG_CPU_BIG_ENDIAN=y CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 arch/arm/kernel/iwmmxt.o $ arm-linux-gnueabi-objdump -dr arch/arm/kernel/iwmmxt.o > gas_before.txt $ b4 am https://lore.kernel.org/lkml/20201107001056.225807-1-jiancai@google.com/ -o - | git am $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 arch/arm/kernel/iwmmxt.o $ arm-linux-gnueabi-objdump -dr arch/arm/kernel/iwmmxt.o > gas_after.txt $ diff -u gas_before.txt gas_after.txt $ echo $? 0 (Orthogonal, it looks like llvm-objdump has issues decoding elf32-bigarm that we'll need to fix.) Either way the patch LGTM for IWMMXT, thanks Jian for the patch and Ard for the suggestions. Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers -- Thanks, ~Nick Desaulniers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A080C4741F for ; Tue, 10 Nov 2020 01:57:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5236206B2 for ; Tue, 10 Nov 2020 01:57:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ipautN6x"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="mJgpiuAk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5236206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OUmpOLCcivKiSa9j/fB4ORHud2CVJWuWvpO2T1+vEKI=; b=ipautN6xXHfOcNSTHvlstvRGG aAWGe3t6BYk5OWMr9LPRszJRXCie9Ng1Opw+WzsD4eu5vB52E/quUL28wRKf4n8yKGgjtx3CjmmMi G5V2imRtpmoiZxfV8NJ45BbdmqYFrtlaXuzhazN6DFMsXbhClaGvTqB9xvWoccjcMDUcNBwtK0zay YB7JSBfdkla+wWCw1yPh3d9+kivcHGSfShz0qANOG2ieaibJYAqlezF6UJ6JpFVXdLA86Ht/Gam+E MgN79gZ8Nsbnm9vC1zj3B/+AhLEhdRKF4BcZeEe1l47GpHSdZgMgvduy2DdUzF7H2FeegXZWC89dM s/ELFNh9g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcIt3-000286-7f; Tue, 10 Nov 2020 01:55:57 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcIt0-00026b-Uu for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 01:55:55 +0000 Received: by mail-pf1-x442.google.com with SMTP id e7so9927795pfn.12 for ; Mon, 09 Nov 2020 17:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D1en5VjSPjbMPhawIIcRIlXt+Lt4izcOc7t6s2LqN7Q=; b=mJgpiuAk/LXqIpi7OXNbBVM23srYhWn/WrR/27ZAxqPogfEifGl+gVDX7HrzP02ffK WHkX5uOW/GGENK4m2YDZW6/3FKOu9mSCQrNIWNpqmJetMhw/3ctugW6UwkA5YkkAl30s cBXYzY3Un3D8OeT7BcIvdLOjaogNtcqCUQgvAA63W8TEszBNTvwAPUDr25/gE8RDl5UM ZEQXIEBxqgAt2KHYYstu3mvbzzH3mygheJTGtClh9mlvzBFHC7GEd2UKv4Y3GfR1bXX/ 87rmYvSNWHmNdQ3CNEGtFshXSRWqtKZrtxLimx2v/7eVSe8BVDCWEH6FiuI6EejjqA33 2v4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D1en5VjSPjbMPhawIIcRIlXt+Lt4izcOc7t6s2LqN7Q=; b=E6OH1sq/JnxrANRjpwnPXJo05WZFIOzd3uxgzVTSVCU3hfyojgbByDnSZYu0appCRF +ou8sxPYBB/KayA1gP/gl1XFnRDq6Oj/dqMsKYQ4UyZQ5LIwf+RzEjVDxw/Z5uvxBnlP kOdqB94R3kdvusj4RqSc8vFEQNQEoWoKBcAV7UWUhQwmamIZJzkRj7MAaLu5wzf7KOeI yezBpm+LyObRtB4lQudhBS/VM0O3CVKdkj38VwseXTkKx1LfqZLSwrIqJyBU21R52jZt 4hplEJ2QTOIfALbpG/1CH4XjfTHdl9uRYxRRXnV2qSuzh9+er33EIGSMetIRdFEOquug QOjQ== X-Gm-Message-State: AOAM531ZOAc08WTcGAxqaHPaTBm2KL3XFa53xOCkhOCtyj3gkrUaNrKV xmZsAh7eBH8YabjmSPkxknvKX57yns0R+tbXmMcVXQJopVLk2A== X-Google-Smtp-Source: ABdhPJxjZ02jGzfuyRScXKwzi9zaxMiWV+n087kdRAervyAPm8llGHicBZxtZlxbTa8vg4x7tBWy2cNQM6IixZBZtyY= X-Received: by 2002:a17:90a:6b04:: with SMTP id v4mr2331926pjj.101.1604973352482; Mon, 09 Nov 2020 17:55:52 -0800 (PST) MIME-Version: 1.0 References: <20200409232728.231527-1-caij2003@gmail.com> <20201107001056.225807-1-jiancai@google.com> In-Reply-To: From: Nick Desaulniers Date: Mon, 9 Nov 2020 17:55:41 -0800 Message-ID: Subject: Re: [PATCH v2] Make iwmmxt.S support Clang's integrated assembler To: Ard Biesheuvel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201109_205555_053947_CA974421 X-CRM114-Status: GOOD ( 16.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Kernel Mailing List , Russell King , Jian Cai , clang-built-linux , Manoj Gupta , Luis Lozano , Nathan Chancellor , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Nov 7, 2020 at 12:29 AM Ard Biesheuvel wrote: > > On Sat, 7 Nov 2020 at 01:11, Jian Cai wrote: > > > > This patch replaces 6 IWMMXT instructions Clang's integrated assembler > > does not support in iwmmxt.S using macros, while making sure GNU > > assembler still emit the same instructions. This should be easier than > > providing full IWMMXT support in Clang. > > > > "Intel Wireless MMX Technology - Developer Guide - August, 2002" should > > be referenced for the encoding schemes of these extensions. > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/975 > > > > Suggested-by: Nick Desaulniers > > Suggested-by: Ard Biesheuvel > > Signed-off-by: Jian Cai > > Please make sure you test this carefully on BE32, as the instruction > byte order used by .inst is LE IIRC Unless that was a recent-ish change in GAS, it looks like I get the same disassembly/encodings before/after this patch for CONFIG_BIG_ENDIAN with GNU as. $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 defconfig $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 menuconfig $ grep BIG_ENDIAN .config CONFIG_CPU_BIG_ENDIAN=y CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 arch/arm/kernel/iwmmxt.o $ arm-linux-gnueabi-objdump -dr arch/arm/kernel/iwmmxt.o > gas_before.txt $ b4 am https://lore.kernel.org/lkml/20201107001056.225807-1-jiancai@google.com/ -o - | git am $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make CC=clang -j71 arch/arm/kernel/iwmmxt.o $ arm-linux-gnueabi-objdump -dr arch/arm/kernel/iwmmxt.o > gas_after.txt $ diff -u gas_before.txt gas_after.txt $ echo $? 0 (Orthogonal, it looks like llvm-objdump has issues decoding elf32-bigarm that we'll need to fix.) Either way the patch LGTM for IWMMXT, thanks Jian for the patch and Ard for the suggestions. Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers -- Thanks, ~Nick Desaulniers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel