[LLVMdev] Trying to compile llvm-gcc to mips

Julio
Mon, 07 Jul 2008 09:49:55 -0000

Hi, well, I downloaded the head revision of llvm and llvm-gcc. As you said
it hangs at:

Formal argument #0 has unhandled type f32
/home/julio/trunk/llvm-gcc/gcc/libgcc2.c:1765: internal compiler error:
Abortado
Please submit a full bug report,
with preprocessed source if appropriate.

Actually, I don't need fp, there is any way to disable?

By the way, I'm working with a MIPS coprocessor with vectorial
reconfigurable units (similar to RSVP). My future work will be autovectorize
loops (I've already studied some code in LLVM and doesn seems very
difficult, thanks to ScalarEvolution, LoopInfo, etc.). I was wondering about
compiling newlib with gcc, compiling my code with llvm, and linking with the
traditional ld, OR, compiling newlib with llvm, link my code and newlib (in
llvm bitcode), and finally assemble to MIPS binary. With the second way, I
could optimize functions like memcpy with vectorial instructions :).

The problem, is that in newlib there are c code mixed with MIPS assembler. I
was wondering if configuring its compilation using llvm-gcc as CC and gnu-as
as AS would work (linking the as files finally with ld and the result of the
llvm assembler). In this way, with llvm-gcc working with -c and --emit-llvm
command-options, would call gnu-as or llvm-as?

Thanks.
Julio

PD: My english isn't as good as I wanted, so if you don't understand me
let
me know.



2008/7/6 Bruno Cardoso Lopes <bruno.cardoso at gmail.com>:

> Hi Julio,
>
> On Sun, Jul 6, 2008 at 1:58 PM, Julio <julio.martin.hidalgo at
gmail.com>
> wrote:
> > Hello, I'm trying to compile llvm-gcc to crosscompile mips. I have
> already
> > modified a config.gcc to add mips as a target with llvm, but it gives
me
> > "Did not get a target machine!" (from llvm-backend.cpp).
> >
> > I thought that I had to modify TargetMachOWriterInfo.h with MIPS info,
> but
> > now the problem is that I don't know where can I get the
<mach/machine.h>
> (I
> > don't have it in /usr/include).
> >
> > Any suggestions?
>
> Are you using the llvm-gcc top-of-tree(TOT) ? the TOT contains mips
> crosscompile
> support, btw, you wont be able to pass through libgcc fp compile, which is
> what
> I'm working right now.
> What I suggest is that you begin the cross-compilation using llvm-gcc TOT,
> and
> when it breaks, use cc1 directly to emit llvm bytecode specific for mips.
> Then,
> use llc.
> If you have doubts, just ask :)
>
> --
> Bruno Cardoso Lopes
> http://www.brunocardoso.cc
> "When faced with untenable alternatives, you
>  should consider your imperative."
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20080707/4a83fae7/attachment.html>