Dear llvm developers, I am trying to run clang assembler to use avx instructions on Mac. I use gcc 4.7.1 to generate .s files from .c files. I can assemble foo.s by clang -c -x assembler foo.s to get foo.o but clang -c -x assembler foo_long.s fails with $clang -x assembler foo_long.s foo_long.s:27:2: error: invalid instruction mnemonic 'vcvttsd2siq' vcvttsd2siq %xmm0, %rax ^~~~~~~~~~~ clang can assemble many other .s files with avx instructions. I tried the default clang, clang+llvm 3.1 binary and svn checked out llvm/clang. All same. Have you any idea? Thank you so much! Nobu Nobu Katayama nobu.katayama at ipmu.jp foo.c void foo(int *a, double *b, int n){ int i; for (i=0; i<8*n; i++){ a[i] = b[i]; } } foo_long.c void foo(long *a, double *b, int n){ int i; for (i=0; i<8*n; i++){ a[i] = b[i]; } } diff foo.s foo_long.s 17c17 < leaq 0(,%rax,4), %rdx ---> leaq 0(,%rax,8), %rdx27,28c27,28 < vcvttsd2si %xmm0, %eax < movl %eax, (%rdx) ---> vcvttsd2siq %xmm0, %rax > movq %rax, (%rdx)
片山 伸彦 <nobu.katayama <at> ipmu.jp> writes:> > Dear llvm developers, > > I am trying to run clang assembler to use avx instructions on Mac. > > I use gcc 4.7.1 to generate .s files from .c files. I can assemble foo.s by > > clang -c -x assembler foo.s > > to get foo.o but > > clang -c -x assembler foo_long.s > > fails with > > $clang -x assembler foo_long.s > foo_long.s:27:2: error: invalid instruction mnemonic 'vcvttsd2siq' > vcvttsd2siq %xmm0, %rax > ^~~~~~~~~~~ > > clang can assemble many other .s files with avx instructions. I tried thedefault clang, clang+llvm 3.1> binary and svn checked out llvm/clang. All same. > > Have you any idea? > > Thank you so much! > > Nobu > > Nobu Katayama > nobu.katayama <at> ipmu.jpSame problem here. I have used clang (both OS X 10.6.8 native clang-2.9 and Macports clang-3.1) in a wrapper script along with GCC 4.7.1 to build ATLAS (tuned BLAS and LAPACK libraries). I ran into this error as well. error: invalid instruction mnemonic 'vcvttsd2siq' vcvttsd2siq %xmm0, %rax The wrapper script is described here: http://old.nabble.com/Re%3a-gcc,-as,-AVX,-binutils-and-MacOS-X-10.7-p32584737.html JJ
Eli Friedman
2012-Jul-17 01:22 UTC
[LLVMdev] clan -x assembler fails on vcvttsd2siq instruction
On Sun, Jul 15, 2012 at 4:33 PM, 片山 伸彦 <nobu.katayama at ipmu.jp> wrote:> Dear llvm developers, > > I am trying to run clang assembler to use avx instructions on Mac. > > I use gcc 4.7.1 to generate .s files from .c files. I can assemble foo.s by > > clang -c -x assembler foo.s > > to get foo.o but > > clang -c -x assembler foo_long.s > > fails with > > $clang -x assembler foo_long.s > foo_long.s:27:2: error: invalid instruction mnemonic 'vcvttsd2siq' > vcvttsd2siq %xmm0, %rax > ^~~~~~~~~~~ > > clang can assemble many other .s files with avx instructions. I tried the default clang, clang+llvm 3.1 binary and svn checked out llvm/clang. All same. > > Have you any idea? > > > Thank you so much!It looks like LLVM expects both versions to be spelled without the "q". -Eli
Nobu Katayama
2012-Jul-18 21:12 UTC
[LLVMdev] clan -x assembler fails on vcvttsd2siq instruction
Hi all, Thanks for response. Will this be fixed sometime soon? Is there anything I can do to make it work in my copy of the latest llvm source? Best, Nobu 2012/7/17 jj <h59213 at rtrtr.com>:> 片山 伸彦 <nobu.katayama <at> ipmu.jp> writes: > >> >> Dear llvm developers, >> >> I am trying to run clang assembler to use avx instructions on Mac. >> >> I use gcc 4.7.1 to generate .s files from .c files. I can assemble foo.s by >> >> clang -c -x assembler foo.s >> >> to get foo.o but >> >> clang -c -x assembler foo_long.s >> >> fails with >> >> $clang -x assembler foo_long.s >> foo_long.s:27:2: error: invalid instruction mnemonic 'vcvttsd2siq' >> vcvttsd2siq %xmm0, %rax >> ^~~~~~~~~~~ >> >> clang can assemble many other .s files with avx instructions. I tried the > default clang, clang+llvm 3.1 >> binary and svn checked out llvm/clang. All same. >> >> Have you any idea? >> >> Thank you so much! >> >> Nobu >> >> Nobu Katayama >> nobu.katayama <at> ipmu.jp > > > Same problem here. I have used clang (both OS X 10.6.8 native clang-2.9 and > Macports clang-3.1) in a wrapper script along with GCC 4.7.1 to build ATLAS > (tuned BLAS and LAPACK libraries). I ran into this error as well. > > error: invalid instruction mnemonic 'vcvttsd2siq' > vcvttsd2siq %xmm0, %rax > > The wrapper script is described here: > http://old.nabble.com/Re%3a-gcc,-as,-AVX,-binutils-and-MacOS-X-10.7-p32584737.html > > JJ > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reasonably Related Threads
- [LLVMdev] clan -x assembler fails on vcvttsd2siq instruction
- [LLVMdev] clan -x assembler fails on vcvttsd2siq instruction
- [LLVMdev] clan -x assembler fails on vcvttsd2siq instruction
- Can I save my console contents automatically?
- rsync 2.6.2 with Posix socket on HP-UX