[llvm-dev] Clang for the PlayStation 2

Alexander Richardson via llvm-dev llvm-dev at lists.llvm.org
Sat Sep 8 15:32:20 PDT 2018


On Fri, 7 Sep 2018 at 18:53, Dan Ravensloft via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> On Fri, 7 Sep 2018 at 17:48, Tim Northover <t.p.northover at gmail.com> wrote:
>>
>> I looked at your diffs and you've only changed one of the functions to
>> return SDValue(), you need to change lowerFP_TO_SINT itself too. The
>> one with the store is just there as an optimization; if it doesn't
>> trigger (because of your diff) then lowerFP_TO_SINT will still create
>> a bad node afterwards.
>
>
> Thank you!
>
> With that, the four bugs I found in newlib's C code are dead. I think the lrint fix should be upstreamed right away; would you mind if I credited you in the patch?
>
> Unfortunately, we are not out of the woods yet. If memory serves me correctly, newlib has some assembly code in used for things like `_start` to bring up the C runtime, which GNU binutils accepts and Clang's assembler currently does not.
>
> I'll go build that so I'm not talking out of my ass.

Hi Dan,

In case you are interested in the baremetal libgloss bits, I made some
changes to get that to compile with clang in
<https://github.com/CTSRD-CHERI/newlib>. This also contains some
unrelated changes to make it easier to use on QEMU MALTA and to build
in CHERI pure-capability mode but the changes to the MIPS crt0 bits
might be useful.
I believe <https://github.com/CTSRD-CHERI/newlib/commit/2e686345f77a1b745e504ffdbdf012ec78fbfc74>
and possibly some follow-up commits should be sufficient to compile
libgloss with clang (at least for MIPS64).


Alex

> Cheers, Tim!
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list