Can D get on XBone and PS4?
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jan 18 00:05:57 PST 2015
On 18 January 2015 at 16:48, Joakim via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> I just stumbled across this article from a year ago, which says the PS4
> toolchain is based on llvm/clang:
>
> http://www.phoronix.com/scan.php?page=news_item&px=MTU1MTY
>
> I know some here were excited about the possibility of getting D on the new
> consoles since they were switching to x86, but is that really possible? I
> googled other alternative compiled languages combined with playstation 4 and
> found... nothing.
>
> I don't know if Sony/Microsoft put in legal roadblocks to using anything
> other than the officially supported languages for game development on their
> consoles. If not, this could be a good way to differentiate D, especially
> given the current nogc focus.
>
> Perhaps Manu or one of the the other game developers can comment on the
> feasibility of getting D on the major consoles.
At Remedy, we ran D code on xbone with no opposition from MS.
For xbone, we wanted to maintain compatibility with the rest of our
MSVC code, which meant we needed to produce COFF output that the MSVC
linker accepts. Walter implemented DMD-Win64 with these requirements
in mind.
PS4 should be easier using LDC, but I don't know if Sony would take
issue with this. I expect them to take less issue than MS, so I'd give
good odd's that they'd be fine with it.
Short answer, D works on modern consoles just fine, and there were no
political blocks for us. GC is a demonstrated problem; avoid it. DMD's
codegen is also a problem; it uses x87 to perform operations, despite
the fact the x64 ABI uses SSE regs for float passing. That results in
a lot of register switching, and poor float performance as a result.
As an (awkward) workaround, you can use explicit SSE intrinsics to
keep working in XMM, but I haven't tested the optimiser's quality in
that case, and the std library obviously doesn't do that.
More information about the Digitalmars-d
mailing list