Hi Jeffrey,

Thanks for the help.
As you pointed out the problem was in using AESNI. Adding -
DCRYPTOPP_DISABLE_AESNI to directives was the solution.
By the way, I used experimental gcc 4.7 this time.

Kind regards,
Moadeli


On May 5, 8:01 pm, Jeffrey Walton <[email protected]> wrote:
> On May 5, 9:31 am, MMoadeli <[email protected]> wrote:> Hi Jeffery,
>
> > Many thanks for the reply.
> > With your advised compiler directives I got similar errors. I tried
> > both gcc-4.4 and gcc-4.6.
> > Actually, the errors are the result of compiling gcm.cpp.
>
> http://software.intel.com/en-us/articles/intel-carry-less-multiplicat...
>
> > Following are the errors generated as the result of using different
> > compiler directives.
>
> You appear to be having problems with AESNI (correct me here if I am
> wrong). AESNI is available on the newer Intel processors (i5, i7,
> etc), but not Core 2 Duo. Open config.h, and add the following at the
> end of the header. Note that it is not portable - its a one-off for
> your situation.
>
> # if defined(CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE)
> # undef CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
> #endif
>
> # define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0
>
> The idea is to skip the block starting at line 19 in cpu.h 
> (seehttp://cryptopp.svn.sourceforge.net/viewvc/cryptopp/trunk/c5/cpu.h?re...).
>
> I'm not sure why the version of GCC (4.5, 4.6) on Snow Leopard is
> causing problems. I suspect it has to do with some Crypto++ defines
> from config. I *think* the following would fix it, but I can't say for
> sure (config.h, line 292). I believe the following keeps from defining
> AESNI in Crypto++ when __APPLE__ and GCC 4.2 is being used.
>
> Jeff
>
> jeffrey@newton~/cryptopp$ svn diff config.h
> Index: config.h
> ===================================================================
> --- config.h    (revision 527)
> +++ config.h    (working copy)
> @@ -289,7 +289,7 @@
>         #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
>  #endif
>
> -#if !defined(CRYPTOPP_DISABLE_SSSE3) && !
> defined(CRYPTOPP_DISABLE_AESNI) &&
> CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && (CRYPTOPP_GCC_VERSION >=
> 40400 || _MSC_FULL_VER >= 150030729 || __INTEL_COMPILER >= 1110)
> +#if !defined(CRYPTOPP_DISABLE_SSSE3) && !
> defined(CRYPTOPP_DISABLE_AESNI) &&
> CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && (CRYPTOPP_GCC_VERSION >=
> 40400 || _MSC_FULL_VER >= 150030729 || __INTEL_COMPILER >= 1110) && !
> (defined(__APPLE__) && (CRYPTOPP_GCC_VERSION <= 40200))
>         #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 1
>  #else
>         #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0
> jeffrey@newton~/cryptopp$
>
>
>
>
>
>
>
> > ---------------------------
> > 1- Using advised directives
>
> > MyMacOSX>c++ -m64 -mtune=core2 -g3 -ggdb -DDEBUG -O0 -
> > DCRYPTOPP_DISABLE_ASM -pipe -c gcm.cpp
>
> > cpu.h:53:no such instruction: `pclmulqdq $16, -368(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $0, -224(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $0, -208(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $16, -160(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $1, -112(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $17, -32(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $0, -1344(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $1, -1264(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $0, -1152(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $1, -1024(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $1, -944(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $1, -832(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $16, -672(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $17, -592(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $16, -480(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $16, -352(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $16, -272(%rbp),%xmm0'
> > cpu.h:53:no such instruction: `pclmulqdq $16, -160(%rbp),%xmm0'
>
> > --------------------------
> > 2- Other variations, -pipe doesn't affect
>
> > MyMacOSX> c++ -m64 -mtune=core2 -g3 -ggdb -DDEBUG -O0 -mpclmul -maes  -
> > DCRYPTOPP_DISABLE_ASM  -c gcm.cpp
> > :3422:no such instruction: `pclmulqdq $16, %xmm1,%xmm0'
> > :3472:no such instruction: `pclmulqdq $0, %xmm1,%xmm0'
> > :3581:no such instruction: `pclmulqdq $0, %xmm1,%xmm0'
> > :3588:no such instruction: `pclmulqdq $16, %xmm1,%xmm0'
> > :3593:no such instruction: `pclmulqdq $1, %xmm2,%xmm1'
> > :3611:no such instruction: `pclmulqdq $17, %xmm1,%xmm0'
> > :52:no such instruction: `pclmulqdq $0, %xmm1,%xmm0'
> > :69:no such instruction: `pclmulqdq $1, %xmm1,%xmm0'
> > :102:no such instruction: `pclmulqdq $0, %xmm1,%xmm0'
> > :38:no such instruction: `pclmulqdq $1, %xmm1,%xmm0'
> > :55:no such instruction: `pclmulqdq $1, %xmm1,%xmm0'
> > :86:no such instruction: `pclmulqdq $1, %xmm1,%xmm0'
> > :52:no such instruction: `pclmulqdq $16, %xmm1,%xmm0'
> > :69:no such instruction: `pclmulqdq $17, %xmm1,%xmm0'
> > :102:no such instruction: `pclmulqdq $16, %xmm1,%xmm0'
> > :38:no such instruction: `pclmulqdq $16, %xmm1,%xmm0'
> > :55:no such instruction: `pclmulqdq $16, %xmm1,%xmm0'
> > :86:no such instruction: `pclmulqdq $16, %xmm1,%xmm0'
> > --------------------------------------------------------------------------- 
> > -----------
>
> > Kind regards,
> > Moadeli
>
> > [SNIP]

-- 
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.

Reply via email to