Hello Niels,

On Tue, Feb 02, 2021 at 07:40:44AM +0100, Niels Möller wrote:

> > llvm-as wouldn't recognize pmull instruction without
> > adding -march=armv8-a+crypto flag at least with the version I use "3.8.1"

3.8.1 was released in 2017. It might not support recent
aarch64 additions regarding .arch directive and friends.

> > I tried both .arch armv8-a+crypto and .arch_extension crypto and they
> > worked only for gas while llvm-as produces errors for pmull using.
> Is there any documentation for llvm-as? Best I could find is the minimal
> man page https://www.llvm.org/docs/CommandGuide/llvm-as.html, with no
> info whatsoever on, e.g., supported pseudoops.

I think my mentioning of llvm-as was a red herring. Looking at the
output of clang -v, llvm-as isn't involved at all. This is supported by
the man page stating that llvm-as accepts LLVM assembly and emits LLVM
bytecode. It appears, clang implements the assembler internally and we'd
need documentation on that. The clang man page even says so):

# man clang | grep assembler
              Clang  also  supports the use of an integrated assembler,
in which the code generator produces object files directly. This avoids
              the overhead of generating the ".s" file and of calling
the target assembler.

With that info I find [1] which lists the .arch directive including
+crypto syntax. armclang seems to be the official ARM toolchain.[2]

[1] 
https://www.keil.com/support/man/docs/armclang_ref/armclang_ref_hhk1510674590407.htm
[2] 
https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads/version-6

It is unclear to me if it's available upstream as well or an ARM
addition to the assembler. I'll try to get clang/llvm installed on my
pine64 boards for tests. That might take a few days though. :) I'll see
if I can try a prebuilt toolchain in the meantime.

Calling clang on assembly source with extension .s it calls itself with
(undocumented) option -cc1as, so likely again the integrated assembler:

# clang -v -c -o t.o t.s
clang version 11.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
 "/usr/lib/llvm/11/bin/clang-11" -cc1as -triple x86_64-pc-linux-gnu
-filetype obj -main-file-name t.s -target-cpu x86-64
-fdebug-compilation-dir /home/m -dwarf-debug-producer "clang version
11.0.1" -dwarf-version=4 -mrelocation-model static -o t.o t.s
-- 
Sorry,
Michael
_______________________________________________
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to