ARM support
Johannes Pfau
nospam at example.com
Sun Jan 12 03:30:45 PST 2014
Am Fri, 10 Jan 2014 08:27:37 +0000
schrieb "Joakim" <joakim at airpost.net>:
> On Thursday, 9 January 2014 at 18:07:16 UTC, Piotr Szturmaj wrote:
> > Hello,
> >
> > I'm developing embedded system product on ARM9/Linux platform
> > and I wish I could use D and vibe.d for this task.
> >
> > I have couple of questions in this matter:
> Like Mike, I'm an interested user, who wants to see D on ARMv7,
> not a core developer, but I'll take a shot at answering your
> questions.
>
> > - What is the current status of ARM support?
> Limited. The reference DMD compiler has no support for ARM,
> while the LDC and GDC compilers are trying to utilize the ARM
> backends of llvm and gcc to add ARM support, as Mike points out,
> but they're not finished. Not sure where ARM9 specifically fits
> into all this.
The exact ARM architecture version doesn't matter that much. I mainly
test ARMv5 and ARMv6 older versions are untested. But OS support does
matter, I only work on Linux/GLIBC systems right now.
> > - Does druntime support ARM plaforms?
> Grepping through the code, druntime appears to use a fair amount
> of x86 assembly, but I have not yet looked into how much of that
> is optimization and therefore not strictly necessary to
> reimplement on ARM.
You'll have to look at GDC/LDC druntime and not the DMD druntime to
see the ARM stuff. GDC/LDC specific stuff is not being upstreamed.
There's some ARM asm in GDC:druntime, but we try to rewrite all DMD
asm in terms of cross-platform GCC builtins (__builtin_trap instead of
asm{int 3;} and so on) so there's really not much ASM left for
GDC:druntime.
> > - Does GC run reliably on ARM (or is it platform independent)?
> I don't think anybody can know for sure, since nobody has tried
> to make it work. The source appears to be fairly independent,
> but other core features like threading or fibers appear not be.
The GC works just fine for GDC/ARM. See my other reply for details.
Threading is portable as long as you're on Posix, Fibers in theory as
well (there is a backend using posix libc functions and that works fine
on ARM. But only recent glibc version > 2.17 implement these functions)
More information about the Digitalmars-d
mailing list