LLVM-MIPS

Somebody in this dev-list alreday did it with LLVM.

I guess you are speaking about Bruno Cardoso Lopes ? I can see there is a MIPS implementation in LLVM repository but it looks like uncomplete (that is, I'm not even sure it can compile any source). What I hope is to have a complete MIPS implementation so I can adapt it for PlayStationPortable and add the necessary stuff so that it may use VFPU registers and instructions (processor specialised into vector and matrix operations).

> He seems to consult you.

to "consult" me ? I'm not sure to understand what you mean.

Regards

Bruno is working on this as a Google Summer of Code project. I'm not sure what his status is, but ideally it will be more complete by the end of the summer. I'm sure he'd appreciate collaboration, though!

--Owen

Hi Hidle,

2007/7/19, Hlide <hlide@free.fr>:

Somebody in this dev-list alreday did it with LLVM.

I guess you are speaking about Bruno Cardoso Lopes ? I can see there is
a MIPS implementation in LLVM repository but it looks like uncomplete
(that is, I’m not even sure it can compile any source). What I hope is

Yes, it’s not complete yet but i’m working on it.
I can compile simple sources. As it’s on a experimental
stage i did not added the patch to the llvm autoconf files.

to have a complete MIPS implementation so I can adapt it for
PlayStationPortable and add the necessary stuff so that it may use VFPU
registers and instructions (processor specialised into vector and matrix
operations).

That’s cool, i have plans to do the same for ps2
:slight_smile:

He seems to consult you.

to “consult” me ? I’m not sure to understand what you mean.

Regards


LLVM Developers mailing list
LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Cheers,

Selon Bruno Cardoso Lopes <bruno.cardoso@gmail.com>:

Hi Hidle,

Yes, it's not complete yet but i'm working on it.
I can compile simple sources. As it's on a experimental
stage i did not added the patch to the llvm autoconf files.

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) ? 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 :///

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
:slight_smile:

:slight_smile:

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
:slight_smile:

:slight_smile:
_______________________________________________
LLVM Developers mailing list
LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-Chris

Hello.

executable from llvm-gcc outputs nothing where executable from normal gcc
outputs '0'.

This seems to be pretty strange. Each mingw32 build of llvm-gcc is
tested via building of Qt library. And I didn't find any problem with
it last time.

I'll check your testcase.