Problem about "llc -march=msil"


I am trying to use llvm to translate ftp.c(a file of wget-1.11.2.tar.bz2 ) to msil. But it shows errors like:

[dayin@localhost src]$ llvm-gcc -emit-llvm ftp.c -c -o ftp.bc

[dayin@localhost src]$ llc ftp.bc -march=msil -o ftp.s

Intrinsic ID = 32

llc: /home/dayin/llvm/llvm-2.2/lib/Target/MSIL/MSILWriter.cpp:802: void ::MSILWriter::printIntrinsicCall(const llvm::IntrinsicInst*): Assertion `0 && “Invalid intrinsic function”’ failed.

llc((anonymous namespace)::PrintStackTrace()+0x15)[0x8759049]



llc((anonymous namespace)::MSILWriter::printIntrinsicCall(llvm::IntrinsicInst const*)+0xbd)[0x8194db9]


What does these mean?

And the follow commands work well:

[dayin@localhost src]$ llc ftp.bc -o ftp.s

[dayin@localhost src]$ llc ftp.bc -march=c -o ftp.c.s

[dayin@localhost src]$ llvm-dis ftp.bc –o ftp.ll

Enc. ftp.bc and ftp.ll

Thank you!

ftp.ll (187 KB)

ftp.bc (38.4 KB)


What does these mean?

The bytecode contains call to intrinsic, which is not supported by by
MSIL backend. The only intrinsics currently supported 'natively' are
vastart, vaend, vacopy.

You might want to extend MSILWriter to use default intrinsic lowering
mechanism, however, don't expect, that you'll have something workable -
in general, you cannot just grab .c file, translate it with llvm-gcc
to .bc and use MSIL writer - you will still need implementations of
bunch of stuff, which are in gcc runtime (e.g. gcc builtins and many
other things).