Hello dev team,
I'm on Linux x86-64 system and when compiling the latest git pull I ran into the following compile errors:
[ 47%] Building CXX object modules/native/dynlib/src/CMakeFiles/dynlib_fm.dir/dynlib_sys_gcc.cpp.o/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp: Assembler messages:/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp:95: Error: invalid instruction suffix for `push'/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp:96: Error: invalid instruction suffix for `push'/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp:97: Error: invalid instruction suffix for `push'/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp:111: Error: invalid instruction suffix for `push'/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp:146: Error: invalid instruction suffix for `pop'/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp:147: Error: invalid instruction suffix for `pop'/home/jamesbl/prog/c++/falcon-master/modules/native/dynlib/src/dynlib_sys_gcc.cpp:148: Error: invalid instruction suffix for `pop'make[2]: *** [modules/native/dynlib/src/CMakeFiles/dynlib_fm.dir/dynlib_sys_gcc.cpp.o] Error 1make[1]: *** [modules/native/dynlib/src/CMakeFiles/dynlib_fm.dir/all] Error 2make: *** [all] Error 2jamesbl@tethys:~/prog/c++/falcon-master$ cat modules/native/dynlib/src/dynlib_sys_gcc.cpp | sed '95,110!d' __asm__ __volatile__( "pushl %%ebx \n" /* Save used registers */ "pushl %%esi \n" "pushl %%edi \n" "movl %%esp, %%edi\n" /* Create a fake frame */ "1: movl %3, %%esi \n" /* Get next parameter's size */ "addl %4, %%esi \n" /* Move count ptrs forward */ "movl (%%esi), %%ebx \n" "andl $0x7f, %%ebx \n" /* We're not interested in knowing the value is float */x86-64 64-bit instructions are often accomplished by their 32-bit counterparts with needed conversion with the REX prefix. However, the 64-bit versions use an extended register with a different nomenclature. Hence,
pushl %%ebx ; 32-bitpushq %%rbx ; 64-bitmovl %%esp, %%edi ; 32-bitmovq %%rsp, %%rdi ; 64-bitI have added in a preprocessor conditional check for x86-64 architecture as a guard around the 32-bit specific inline assembler from the trunk using what all modern GCC compilers define on 64-bit systems, as:
#ifdef __LP64__// my 64-bit inline asm conversion#else// original 32-bit inline asm#endifIt compiles to completion now on Linux x86-64 64-bit now. I have attached the diff patch to this post. I hope you can use it.
Regards,
-gian
---
B. Gian James <jamesbl at
research.cs.colorado.edu>
Microbial Biochemist / UNIX Alchemist
University of Colorado, Boulder
nevdull @ #falcon