sha.cpp:294:2: error: invalid instruction mnemonic 'movsl'

107 views
Skip to first unread message

Manish Gautam

unread,
Aug 18, 2016, 6:37:07 AM8/18/16
to Crypto++ Users
I was trying to compile  cryptopp562 using command "make CXXFLAGS=-m32" 
I gave following errors:

sha.cpp:294:2: error: invalid instruction mnemonic 'movsl'

        ASL(2)  // non-SSE2

        ^

./cpu.h:224:17: note: expanded from macro 'ASL'

        #define ASL(x) GNU_ASL(x)

                       ^

./cpu.h:218:26: note: expanded from macro 'GNU_ASL'

        #define GNU_ASL(x) "\n" #x ":"

                                ^

<scratch space>:172:2: note: expanded from here

"2"

 ^

<inline asm>:2:92: note: instantiated into assembly here

2:mov esi, ecx;lea edi, [esp+4+((1024+7-(0+7))-((1024+7-(0+7))/(8))*(8))*4];mov ecx, 8;rep movsd;mov esi...

                                                                                           ^~~~~~

1 error generated.

make: *** [sha.o] Error 1



Can somebody help me?

Jeffrey Walton

unread,
Aug 18, 2016, 7:19:28 PM8/18/16
to Crypto++ Users

This looks like a Clang-ish error message from inline assembly. What is the platform, and what is the compiler?

Also note that we improved Clang support at Crypto++ 5.6.3. It started at 5.6.3 and continued after as encountered more issues with the integrated assembler. Prior to 5.6.3, I believe -DCRYPTOPP_DISABLE_ASM was added to CXXFLAGS to avoid all the problems with the integrated assembler. You might want to consider using Crypto++ 5.6.3 or Master.

Jeff

Manish Gautam

unread,
Aug 19, 2016, 12:44:49 AM8/19/16
to Crypto++ Users
I tried 5.6.3, I am getting follwoing errors

mgautam-mbp:cryptopp563 mgautam$ export CXXFLAGS="-DNDEBUG -g2 -O2 -stdlib=libc++ -arch i386 -arch x86_64"

mgautam-mbp:cryptopp563 mgautam$ CXX=clang++ make -j 4

WARNING: CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined in config.h.

WARNING: CRYPTOPP_INIT_PRIORITY is not defined in config.h.

WARNING: CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 is defined in config.h.

WARNING: You should make these changes in config.h, and not CXXFLAGS.

WARNING: You can 'mv config.recommend config.h', but it breaks versioning.

WARNING: See http://cryptopp.com/wiki/config.h for more details.


clang++ -DNDEBUG -g2 -O2 -stdlib=libc++ -arch i386 -arch x86_64 -fPIC -march=native -pipe -c cpu.cpp

clang++ -DNDEBUG -g2 -O2 -stdlib=libc++ -arch i386 -arch x86_64 -fPIC -march=native -pipe -c blowfish.cpp

clang++ -DNDEBUG -g2 -O2 -stdlib=libc++ -arch i386 -arch x86_64 -fPIC -march=native -pipe -c blumshub.cpp

clang++ -DNDEBUG -g2 -O2 -stdlib=libc++ -arch i386 -arch x86_64 -fPIC -march=native -pipe -c camellia.cpp

cpu.cpp:104:4: error: register %rbx is only available in 64-bit mode

                        "pushq %%rbx; cpuid; mov %%ebx, %%edi; popq %%rbx"

                        ^

<inline asm>:1:8: note: instantiated into assembly here

        pushq %rbx; cpuid; mov %ebx, %edi; popq %rbx

              ^~~~~

cpu.cpp:104:4: error: register %rbx is only available in 64-bit mode

                        "pushq %%rbx; cpuid; mov %%ebx, %%edi; popq %%rbx"

                        ^

<inline asm>:1:42: note: instantiated into assembly here

        pushq %rbx; cpuid; mov %ebx, %edi; popq %rbx

                                                ^~~~

2 errors generated.

make: *** [cpu.o] Error 1

make: *** Waiting for unfinished jobs.... 

Mobile Mouse

unread,
Aug 19, 2016, 12:51:11 AM8/19/16
to Manish Gautam, Crypto++ Users
Is there any reason you're trying to build "fat" binaries? It used to make sense several years ago, and Apple still allows that - but not any more. Now no system binary is "fat" (they're all 64-bit), and you'd be much better off with just "-arch x86_64".

Sent from my iPad
--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-user...@googlegroups.com.
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 cryptopp-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages