Hi,
I thought I’d to some preliminary work to see what issues I’d run into trying to compile some sources intented for the PS3 PPU target. The PS3 devkit includes a gcc-based compiler, so I’m thinking that would make it a bit easier.
Although there is a -faltivec option, it appears that there is no support yet for the “vector” type (or is it really “__vector”, or perhaps a built-in alias?). I don’t know much about this, so I was wondering if someone out there could say something about it with respect to plans for it in clang.
I suppose that in addition to the vector type, this would also involve all the “__builtin_vec-*” functions, but not having the vector type used in the altivec.h include file was the first thing I ran into.
I’ve enclosed some initial work for the targets, in ps3targets.patch. This depends on changes to the Triple class in ps3triple.patch, which I’ve submitted seperately to the llvmdev list. The gcc-based compiler in the PS3 devkit uses the the “ppu-uknown-lv2” and “spu-unknown-lv2” triples, so these changes do the same. I don’t know why there isn’t a “ps3” in there somewhere, but it probably should be the same in both compilers.
Thanks.
-John
ps3triple.patch (1.56 KB)
ps3targets.patch (2.27 KB)