[llvm-dev] Clang for the PlayStation 2 (original) (raw)
Dan Ravensloft via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 6 09:55:45 PDT 2018
- Previous message: [llvm-dev] Clang for the PlayStation 2
- Next message: [llvm-dev] Clang for the PlayStation 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 6 Sep 2018, 16:31 Tim Northover, <t.p.northover at gmail.com> wrote:
> The PS2, for what it's worth, only has an i32 -> f32 instruction, so I think there's an impedance mismatch somewhere.
This is also a fairly common situation. If the operation can be emulated with a reasonably small number of native instructions you can often get LLVM to do that. In this case it would probably be a libcall though because it's quite _complex. LLVM would generate a call to floatdisf, which will be provided by compiler-rt (there are C implementations for all kinds of floating-point operations there). You should see the same thing if you compile a function doing that conversion with GCC. Cheers. Tim.
So I was rereading this; do you think the lowering function should instead emit a library call instead, then?
If so, would you mind pointing me to a function which performs this, or otherwise give a high-level description of how this is done?
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180906/7642f73c/attachment.html>
- Previous message: [llvm-dev] Clang for the PlayStation 2
- Next message: [llvm-dev] Clang for the PlayStation 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]