Jeffrey,

Thank you very much for pointing out the work-arounds for AS. That's indeed
what is causing the observed problem: GNU assembler that stupid Apple keeps
is v1.38. To keep things simple, I've just replaced /opt/local/bin/as with
the script that

The reason I do NOT want to "just use clang" is that clang seems to have no
clue about AESNI, so all the optimizations and speedups would be lost.

One problem I seem to be having with using gcc-4.9 and clang-assembler is
that now it refuses to build "-arch x86_64 -arch i386", refusing to use
/opt/local/lib/libgcc/<someting> because it's not for i386, and complaining
about being unable to resolve i386 names.

What I will do is (a) compile crypto++-5.6.2 with gcc-4.9 (and native
assembler :) for x86_64, (b) compile crypto++-5.6.2 with Xcode (clang++)
for x86+64, and (c) compare the benchmarks (cryptest.exe b) between the two
and post the results here. If the difference is small - I'll concede that
using clang is the best way to go forward.



On Tue, Oct 1, 2013 at 12:58 AM, Jeffrey Walton <[email protected]> wrote:

>
>
> On Tuesday, October 1, 2013 12:55:26 AM UTC-4, Jeffrey Walton wrote:
>
>>
>>
>> On Monday, September 30, 2013 8:05:29 PM UTC-4, Mouse wrote:
>>
>>> Solution proposed in http://www.cryptopp.com/**wiki/Linux#No_such_**
>>> instruction:_pclmulqdq<http://www.cryptopp.com/wiki/Linux#No_such_instruction:_pclmulqdq>
>>>  did
>>> not help (well, another solution that page suggested was disabling AESNI
>>> via -DCRYPTOPP_DISABLE_AESNI=1 - which wouldn't be my choice of solution).
>>> I wonder why g++-4.9 seems to have a problem with PCLMULQDQ instruction,
>>> which was supposed to be supported/included since gcc-4.4?
>>>
>>> g++ -DNDEBUG -g -O2 -D__STRICT_ANSI__=1 -fPIC -ffunction-sections
>>> -fdata-sections -maes -mpclmul -mtune=core-avx-i -arch x86_64 -arch i386
>>> -DCRYPTOPP_DISABLE_ASM -pipe -c gcm.cpp
>>> :55:no such instruction: `pclmulqdq $1, %xmm7,%xmm2'
>>> :52:no such instruction: `pclmulqdq $1, %xmm6,%xmm5'
>>> :66:no such instruction: `pclmulqdq $1, (%esp),%xmm2'
>>> ....and much more like these......
>>>
>>> Mac OS X 10.8.4, Xcode-5.0, gcc-4.9 (via macports). cryptopp-5.6.2
>>>
>> It almost sounds like you got GCC 4.9, but you're using old Binutils. Can
>> you verify you have an updated AS on path?
>>
>>
>> Have you had a look at http://stackoverflow.com/**
>> questions/9840207/how-to-use-**avx-pclmulqdq-on-mac-os-x-lion<http://stackoverflow.com/questions/9840207/how-to-use-avx-pclmulqdq-on-mac-os-x-lion>
>> **?
>>
>
> By the way, I would personally just:
>
>     export CC=/usr/local/bin/clang; export CXX=/usr/local/bin/clang++
>     make
>
> If you use clang++, open the GNUMakefile and change "clang version" to
> "clang":
>
>     CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c
> "clang")
>
> Jeff
>



-- 
Regards,
Mouse

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to