All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Jian Cai <jiancai@google.com>,
	Manoj Gupta <manojgupta@google.com>,
	Luis Lozano <llozano@google.com>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Russell King <linux@armlinux.org.uk>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] Make iwmmxt.S support Clang's integrated assembler
Date: Mon, 9 Nov 2020 17:55:41 -0800	[thread overview]
Message-ID: <CAKwvOd=pHgT3LsjYH10eXQjLPtiOKDj-8nJwjQ=NMSFLTG1xAg@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXG+qb267Hig6zoO=y6_BVsKsqHikvbJ83YsBD8SBaZ1xw@mail.gmail.com>

On Sat, Nov 7, 2020 at 12:29 AM Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Sat, 7 Nov 2020 at 01:11, Jian Cai <jiancai@google.com> 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 <ndesaulniers@google.com>
> > Suggested-by: Ard Biesheuvel <ardb@kernel.org>
> > Signed-off-by: Jian Cai <jiancai@google.com>
>
> 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
<enable CPU_BIG_ENDIAN>
$ 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 <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
-- 
Thanks,
~Nick Desaulniers

WARNING: multiple messages have this Message-ID (diff)
From: Nick Desaulniers <ndesaulniers@google.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Jian Cai <jiancai@google.com>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Manoj Gupta <manojgupta@google.com>,
	Luis Lozano <llozano@google.com>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] Make iwmmxt.S support Clang's integrated assembler
Date: Mon, 9 Nov 2020 17:55:41 -0800	[thread overview]
Message-ID: <CAKwvOd=pHgT3LsjYH10eXQjLPtiOKDj-8nJwjQ=NMSFLTG1xAg@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXG+qb267Hig6zoO=y6_BVsKsqHikvbJ83YsBD8SBaZ1xw@mail.gmail.com>

On Sat, Nov 7, 2020 at 12:29 AM Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Sat, 7 Nov 2020 at 01:11, Jian Cai <jiancai@google.com> 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 <ndesaulniers@google.com>
> > Suggested-by: Ard Biesheuvel <ardb@kernel.org>
> > Signed-off-by: Jian Cai <jiancai@google.com>
>
> 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
<enable CPU_BIG_ENDIAN>
$ 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 <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
-- 
Thanks,
~Nick Desaulniers

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-10  1:55 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 23:27 [PATCH] ARM: do not assemble iwmmxt.S with LLVM toolchain Jian Cai
2020-04-09 23:27 ` Jian Cai
2020-04-10  0:01 ` Nick Desaulniers
2020-04-10  0:01   ` Nick Desaulniers
2020-04-10  0:12   ` Nathan Chancellor
2020-04-10  0:12     ` Nathan Chancellor
2020-04-10  6:38 ` Sedat Dilek
2020-04-10  6:38   ` Sedat Dilek
2020-04-10  7:44   ` Nathan Chancellor
2020-04-10  7:44     ` Nathan Chancellor
2020-04-10  9:56 ` Arnd Bergmann
2020-04-10  9:56   ` Arnd Bergmann
2020-04-10 11:15   ` Ard Biesheuvel
2020-04-10 11:15     ` Ard Biesheuvel
2020-04-10 12:33     ` Russell King - ARM Linux admin
2020-04-10 12:33       ` Russell King - ARM Linux admin
2020-04-10 13:09       ` Ard Biesheuvel
2020-04-10 13:09         ` Ard Biesheuvel
2020-04-13 20:45         ` Nick Desaulniers
2020-04-13 20:45           ` Nick Desaulniers
2020-04-14  8:59           ` Ard Biesheuvel
2020-04-14  8:59             ` Ard Biesheuvel
2020-04-14 18:38             ` Nick Desaulniers
2020-04-14 18:38               ` Nick Desaulniers
2020-04-14 20:53               ` Kees Cook
2020-04-14 20:53                 ` Kees Cook
2020-04-15 10:32                 ` Ard Biesheuvel
2020-04-15 10:32                   ` Ard Biesheuvel
2020-04-15 12:58                   ` Arnd Bergmann
2020-04-15 12:58                     ` Arnd Bergmann
2020-04-15 14:44                     ` Russell King - ARM Linux admin
2020-04-15 14:44                       ` Russell King - ARM Linux admin
2020-04-19 11:08                       ` Stefan Agner
2020-04-19 11:08                         ` Stefan Agner
2020-04-15 15:44                   ` Kees Cook
2020-04-15 15:44                     ` Kees Cook
2020-04-17 14:12                     ` Masahiro Yamada
2020-04-17 14:12                       ` Masahiro Yamada
2020-04-13 19:23       ` Nick Desaulniers
2020-04-13 19:23         ` Nick Desaulniers
2020-04-13 21:00         ` Russell King - ARM Linux admin
2020-04-13 21:00           ` Russell King - ARM Linux admin
2020-11-04 20:44           ` Nick Desaulniers
2020-11-04 20:44             ` Nick Desaulniers
2020-04-13 19:20   ` Nick Desaulniers
2020-04-13 19:20     ` Nick Desaulniers
2020-04-13 21:15     ` Andrew Lunn
2020-04-13 21:15       ` Andrew Lunn
2020-04-10 16:59 ` Andrew Lunn
2020-04-10 16:59   ` Andrew Lunn
2020-04-10 18:34   ` Russell King - ARM Linux admin
2020-04-10 18:34     ` Russell King - ARM Linux admin
2020-04-13 19:26     ` Nick Desaulniers
2020-04-13 19:26       ` Nick Desaulniers
2020-04-13 21:53       ` Russell King - ARM Linux admin
2020-04-13 21:53         ` Russell King - ARM Linux admin
2020-11-07  0:10 ` [PATCH v2] Make iwmmxt.S support Clang's integrated assembler Jian Cai
2020-11-07  0:10   ` Jian Cai
2020-11-07  8:29   ` Ard Biesheuvel
2020-11-07  8:29     ` Ard Biesheuvel
2020-11-10  1:55     ` Nick Desaulniers [this message]
2020-11-10  1:55       ` Nick Desaulniers
2020-11-10  7:35       ` Ard Biesheuvel
2020-11-10  7:35         ` Ard Biesheuvel
2020-11-10 19:26         ` Nick Desaulniers
2020-11-10 19:26           ` Nick Desaulniers
     [not found]           ` <CA+SOCLJSSR62VfWhKx9R1cxT-CHXD7RN08eJBYxUH8zzyWos9Q@mail.gmail.com>
2020-11-10 20:11             ` Nick Desaulniers
2020-11-10 20:11               ` Nick Desaulniers
2020-11-10 20:38               ` Arnd Bergmann
2020-11-10 20:38                 ` Arnd Bergmann
2020-11-10 21:35                 ` Ard Biesheuvel
2020-11-10 21:35                   ` Ard Biesheuvel
2020-11-12  8:42   ` Ard Biesheuvel
2020-11-12  8:42     ` Ard Biesheuvel
2020-11-12 13:06     ` Arnd Bergmann
2020-11-12 13:06       ` Arnd Bergmann
2020-11-12 20:07   ` [PATCH v3] " Jian Cai
2020-11-12 20:07     ` Jian Cai
2020-11-17  0:37     ` [PATCH v4] " Jian Cai
2020-11-17  0:37       ` Jian Cai
2020-11-17  1:20       ` Nick Desaulniers
2020-11-17  1:20         ` Nick Desaulniers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKwvOd=pHgT3LsjYH10eXQjLPtiOKDj-8nJwjQ=NMSFLTG1xAg@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=ardb@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jiancai@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llozano@google.com \
    --cc=manojgupta@google.com \
    --cc=natechancellor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.