On Tue, 11 Nov 2008, Peter Shugalev wrote:> Anton Korobeynikov wrote: >> And fix 32 bit ones :) Mostly byval stuff + FP arguments. > > How serious these bugs are? Any link to bug descriptions? Is LLVM sparc > target usable and stable in case of not using any FP stuff? >There are usually two levels of translation that go on. First, your C/C++ code is compiled to LLVM IR using llvm-gcc. Then, LLVM generates SPARC assembly from the LLVM IR. llvm-gcc isn't prepared to compile for a SPARC target. This includes lack of complete FP support, and no implementation of the SPARC ABI which means that function arguments aren't passed correctly and you probably can't call any precompiled code that assumes the SPARC ABI. I will be working on fixing this for sparc-solaris, but not sparc64. LLVM code generation doesn't appear to correctly implement atomic builtins, but that should be a trivial thing to fix (so they tell me). -Luke
Hi, Luke K. Dalessandro wrote:> llvm-gcc isn't prepared to compile for a SPARC target. This includes lack > of complete FP support, and no implementation of the SPARC ABI which means > that function arguments aren't passed correctly and you probably can't > call any precompiled code that assumes the SPARC ABI. I will be working on > fixing this for sparc-solaris, but not sparc64.I thought llvm-gcc isn't meant to compile for specific target (at least with -emit-llvm flag I'm using). Speaking of SPARC ABI can I still call non-FP external (i.e. compiled with regular non-llvm gcc to native sparc binary) functions from within LLVM code? Or ABI is competely broken?> LLVM code generation doesn't appear to correctly implement atomic > builtins, but that should be a trivial thing to fix (so they tell me).Do you mean calls like __gnu_cxx::__exchange_and_add ? -- Best Regards Peter Shugalev
Slightly off topic, but I am looking to set up a sparc buildbot on one of our sparcs. This won't help with the incompleteness of the backend, but it will at least help keep sparc building. Andrew
Hi,> I thought llvm-gcc isn't meant to compile for specific target (at least > with -emit-llvm flag I'm using).No, it is not. C language is highly target-specific, thus LLVM IR obtained from such sources also has the same nice 'property'> Speaking of SPARC ABI can I still call non-FP external (i.e. compiled > with regular non-llvm gcc to native sparc binary) functions from within > LLVM code? Or ABI is competely broken?I think best answer will be: try it and let us know :) Currently there is no active sparc maintainer, thus it will be safe to assume it to be arbitrary broken.> Do you mean calls like __gnu_cxx::__exchange_and_add ?http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University