Open Herringway opened 1 year ago
I had performed a test on ldc2 using llvm-mos. The built examples run normally, but bit prediction is complicated for architectures below 32-bit.
I tried to make some changes on the LLVM backend but the result was always the same. Maybe the dmd frontend needs to adapt support.
I had performed a test on ldc2 using llvm-mos. The built examples run normally, but bit prediction is complicated for architectures below 32-bit.
I tried to make some changes on the LLVM backend but the result was always the same. Maybe the dmd frontend needs to adapt support.
I'm glad that I'm not the only one interested in this. As you've discovered, there's quite a few things that need to be addressed before writing code for these platforms can be considered frictionless. Just getting a hello world for the NES compiled was troublesome enough.
Description
I frequently use D to target some highly unusual platforms. Most recently, I've managed to compile a hello world for the NES console, with its 6502 CPU! Previously, I have also compiled games for the nintendo GBA console, and I'm preparing to do the same for the Sega Genesis (m68k), SNES (65816) and Game Boy (Z80). These are all possible with existing tools and compilers, however, there are a number of deficiencies that have been getting in the way and making things harder than they need to be.
else static assert(0);
needs to be eliminated in favour of something that only asserts if used (possiblyelse immutable noreturn Foo;
, though there are some showstopper bugs atm). There may be no C runtime to fall back on, so native D versions of several things will be needed (time_t in particular seems to come up a lot).What are rough milestones of this project?
Each of these are independent and can be finished in any order.
How does this project help the D community?
D is a highly attractive option for low level programming, being able to provide safe and efficient access to hardware with a familiar syntax.
Recommended skills
Point of Contact
Unsure. I can only offer the experience I mentioned above.
References
Issue #14100 Issue #14101 and H1 2015 Priorities and Bare-Metal Programming