Hey list,
So, I've been poking at LDC on ARM. Building and using the compiler
basically works as expected when *not* using druntime and phobos. In
this sense, the ARM port is complete. However, druntime and phobos are
far from ported to ARM; a lot of code (such as varargs stuff, register
saving/restoring, fibers, ...) is incomplete. This makes it impossible
to use the threading and GC infrastructure in druntime (or even
compiling it in the first place).
Now, normally finishing a port is simple: Just fill in the
arch-specific stuff. Unfortunately, a lot of the things that need to
be ported (such as register saving) use inline assembly on x86 and
have no LLVM intrinsics to do the equivalent operation portably.
Further, LDC (to my knowledge; please prove me wrong) has no
generalized inline assembly that's simply passed to the underlying
assembler, like GDC's inline assembly. This means that I would have to
resort to writing this code in an external assembly file and linking
the resulting object into druntime. Not pretty at all; adds complexity
to the build process and makes porting more of a general pain in the
ass.
The inline assembly GDC has:
http://gdcproject.org/wiki/UserDocumentation#line-79
Unless anyone can think of some other solution, I really think LDC
should implement this too. Not only would it enable us to share code
between the two compilers, it would also simplify porting.
Regards,
Alex