[LLVMdev] LLVM-MIPS

Chris Lattner sabre at nondot.org
Fri Jul 20 08:31:09 PDT 2007


On Fri, 20 Jul 2007 hlide at free.fr wrote:
> Right now, I tried the last mingwin binaries of llvm-gcc (downloaded from your
> official website) : I compared the results between what a normal mingw gcc and
> llvm-gcc produce. In fact, I got a buggy x86 executable from llvm-gcc :///, so
> I'm really concerned about the viability (?) of llvm-gcc in so far as I was
> expected from it to be as accurate as the normal gcc version. So now my question
> is : can I trust llvm-gcc for the standard architectures (x86, PPC) ?

I have no idea what is going on with mingw/x86, but the testcase works 
fine for me on darwin/ppc, and I'm sure it works on other targets.  It is 
quite possible that you're linking the llvm-g++ compiled code with the 
wrong version of libstdc++, which could cause a bad mismatch.

> because if
> x86 llvm-gcc produces erronous executables (and it is the case for me), I might
> not expect much better from a MIPS port :///

Regardless of how MINGW or other targets are going, the MIPS port is 
certainly not ready for general use.  However, if you want to contribute 
to its development, it could be very interesting for you.

-Chris

> the test is quite simple (llvm-g++) :
> ----8<--------8<--------8<--------8<----
> #include <iostream>
>
> int evaluate(const std::string &line)
> { return line == "0"; }
>
> int main(int argc, char *argv[])
> {
>  std::string line("1");
>  std::cout << evaluate(line) << std::endl;
> }
> ----8<--------8<--------8<--------8<----
>
> executable from llvm-gcc outputs nothing where executable from normal gcc
> outputs '0'.
>
> Worse, if I replace "evaluate(line)" with "('0' + evaluate(line))", executable
> from llvm-gcc outputs "D" no matter whether if line == "1" or not !
>
>> That's cool,  i have plans to do the same for ps2
>> :)
>
> :)
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list