[LLVMdev] New llvmgcc4 snapshot
Chris Lattner
sabre at nondot.org
Mon May 8 21:01:10 PDT 2006
On Tue, 9 May 2006, Marco Matthies wrote:
> i tried compiling llvmgcc4 on x86_64-linux. The two changes i needed to apply
> to llvm and llvmgcc4 are attached. Those two patches tell llvmgcc4 to use the
> x86 code-generator for x86_64 and give x86_64-* targets a score of 10 for the
> x86 backend when trying to find appropriate backends.
Okay, I'll integrate some variant of these changes into my tree.
As you mention, x86-64 isn't supported right now. It's highly likely that
work will be starting soon on it, but until then, I'd suggest sticking
with 32-bit X86. If you configure llvm-gcc with
--host=i686-unknown-linux-gnu --target=i686-unknown-linux-gnu (going from
memory, may be wrong), you should get a 32-bit compiler that does what you
want.
> Now i'm getting stuck during the compile when an assertion is triggered:
> make[3]: Leaving directory `/home/mcm/projects/llvm/build-gcc4/gcc'
> /home/mcm/projects/llvm/build-gcc4/gcc/xgcc
> -B/home/mcm/projects/llvm/build-gcc4/gcc/
> -B/home/mcm/projects/llvm/install-gcc4/x86_64-unknown-linux-gnu/bin/
> -B/home/mcm/projects/llvm/install-gcc4/x86_64-unknown-linux-gnu/lib/ -isystem
> /home/mcm/projects/llvm/install-gcc4/x86_64-unknown-linux-gnu/include
> -isystem
> /home/mcm/projects/llvm/install-gcc4/x86_64-unknown-linux-gnu/sys-include -O2
> -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT
> -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.
> -I../../2006-05-08-llvm-gcc-4/gcc -I../../2006-05-08-llvm-gcc-4/gcc/.
> -I../../2006-05-08-llvm-gcc-4/gcc/../include
> -I../../2006-05-08-llvm-gcc-4/gcc/../libcpp/include
> -I/home/mcm/projects/llvm/build-release/../llvm-cvs/include
> -I/home/mcm/projects/llvm/build-release/include -DL_mulsc3
> -fvisibility=hidden -DHIDE_EXPORTS -c
> ../../2006-05-08-llvm-gcc-4/gcc/libgcc2.c -o libgcc/./_mulsc3.o
> cc1:
> /home/mcm/projects/llvm/build-release/../llvm-cvs/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2826:
> llvm::SDOperand <unnamed>::SelectionDAGLegalize::PromoteOp(llvm::SDOperand):
> Assertion `getTypeAction(VT) == Promote && "Caller should expand or legalize
> operands that are not promotable!"' failed.
> ../../2006-05-08-llvm-gcc-4/gcc/libgcc2.c:1714: internal compiler error:
Interesting. Since you're using the 32-bit backend, this is a bug in the
32-bit backend, even if it's being misused. Can you copy and paste the
above command, adding "-emit-llvm -o x.bc" to the end? Once you do that,
running 'llc x.bc -march=x86' should cause the same assertion. If so,
please file a bug report in bugzilla and we'll get it fixed.
Thanks,
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list