Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3658901pxb; Mon, 9 Nov 2020 17:57:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyJDr3I50Vz7S6RVYg/E/jjD8LXClwbLdCAnacz1Nt89WAXBHazCjFIUyZHBku+XV0KYAN X-Received: by 2002:a17:906:2e08:: with SMTP id n8mr18683643eji.440.1604973478839; Mon, 09 Nov 2020 17:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604973478; cv=none; d=google.com; s=arc-20160816; b=vi1B3nBaVihVMpcrCdDZhR3rAjOLs3dh803rYRXrIu3eRyRdY8WTU+yNK8Wo/F2qVB /3Hhx7mWJ6SWuFZ8wK/wTHmfPSUhbjjdaHh3hvA3BoebZcf+EEHQU1fSekpOe1AEM4jL lRphotseb3tvZHKuzVzY4DHMfHQIALcOry0TTAZpWEdQGqtuf8PV5H7QNPaNy9tYHydB JwNC3ZY8XGKTF/lxnIUnxEE2CK4Jmv/7crInV4NUjqx9/ITqNFJ1wU0svmB4YtAFBBm2 TwYAc3Zpt7IxvTA6qeSNYvO0iA/XbZEjk+oBd+0prE808S+Z/6upotlhq7UhCIaLlZdd DSCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=D1en5VjSPjbMPhawIIcRIlXt+Lt4izcOc7t6s2LqN7Q=; b=M7taSmTUFb0nVl8tZajPd+watYtcWXzGYFwkU5bX+Nt1S04LPYybKCP/V7uJzTTDN8 21EdnpiVT3fj5bBdH30BmlRlg2hlXx0Dru6OTj44FS1IaCSJL2B9qTVbYDeTwwskpJ8I PcmHbIj67F+6+CJNVJi7pRM28m1tCqpNXUKjvXcLhvdOrLBz3mDwmceYYOi1tGGHQBYm Up3j7KE6DvB/XT3btvQVB1pe2Mvy5z1om/EK07/qCZ4iM5q3E7IxND5qIqtKR9Mevbzd uh4meITCO02nr11zWuKpWwGm5mfr5XHGBWLRPQcZCcgbI3vIAZ47J+/1AKbvSUvHqT0R WEAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mJgpiuAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si8277509edq.426.2020.11.09.17.57.35; Mon, 09 Nov 2020 17:57:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mJgpiuAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729874AbgKJBzz (ORCPT + 99 others); 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-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