<div dir="auto"><div>Hello Jacob ,</div><div dir="auto"><br></div><div dir="auto">Thanks for the fast response!</div><div dir="auto"><br></div><div dir="auto">So you mentioned the problem is in clang ATT compatibility. But could you please confirm the UAL supports ATT style , because I haven't found any information there. </div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Best Regards.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, 31 Oct 2022, 04:56 Jacob Bachmeyer, <<a href="mailto:jcb62281@gmail.com">jcb62281@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Dmytro Kovalov via Gnupg-users wrote:<br>
> Hello,<br>
><br>
> I found a strange libgcrypt behavior on ARM with clang built.<br>
><br>
> There is a big gap in performance of libgcrypt, built by clang, in <br>
> comparison with gcc on my ARM target machine.<br>
> The simple profile test shows 100-500% advantage of gcc gcrypt.<br>
> I found an awkward workaround to beat this issue, but need your help <br>
> to find the best way to fix it.<br>
><br>
> The root cause is next:<br>
> Due to clang strict assembler syntax rules the unified assembler ARM <br>
> check doesn't pass.<br>
> Assembler check fails while ./configure for flags:<br>
> HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS<br>
> HAVE_GCC_INLINE_ASM_NEON<br>
><br>
> As a workaround I remove '%' from registers names in<br>
> <a href="http://configure.ac" target="_blank" rel="noreferrer">configure.ac</a> <<a href="http://configure.ac" target="_blank" rel="noreferrer">http://configure.ac/</a>>,<br>
> arm mips lib *.S files,<br>
> cipher/*arm.S,*armv7-neon.S files.<br>
><br>
> Could you please help with a more correct - polite way to compile <br>
> libgcrypt with assembler code?<br>
<br>
I would suggest using the GNU toolchain. :-)<br>
<br>
The problem is that the GNU assembler traditionally expects register <br>
names to be prefixed with %, using a syntax based on that of the old <br>
AT&T assembler and known (simply enough) as "AT&T syntax" while many <br>
vendor assemblers use a different syntax. Note that the configure tests <br>
in question are for GCC-or-strictly-compatible. If clang does not <br>
support the GNU assembler syntax, then it is not fully compatible with <br>
GCC, and libgcrypt is being compiled correctly.<br>
<br>
Since LLVM claims compatibility with GCC, you should direct your <br>
complaints there: CLang apparently claims compatibility with the GNU <br>
toolchain, but does not support GNU assembler syntax.<br>
<br>
<br>
-- Jacob<br>
</div>
</blockquote></div></div></div>