DMD AArch64 progress
Walter Bright
newshound2 at digitalmars.com
Fri Mar 7 17:41:13 UTC 2025
I've reached the point with the AArch64 code generation that DMD should be able
to generate working programs with it.
Since everything has to work in order to compile druntime, I am working first on
ImportC, which only requires the C standard library to function. I had it
working with "hello world", a trivial program, but am now ready for more
substantial testing.
It turns out that the D test suite doesn't have much C code in it, and does not
have specific tests for arithmetic and other low level operations. (A lot of
this is tested incidentally by everything else in the libraries and test suite.)
These tests do exist for the Digital Mars C/C++ compiler, and I relied on
testing that compiler for that testing.
But, I am no longer building DMC++ and am not running that test suite anymore.
So I have started adding parts of the DMC test suite to the D test suite. Those
tests date back to the 1980s, and are targeted at the 16 bit memory model,
Windows, and obsolete C practices. The first step was to update this and get it
to work with gcc.
Next, I needed to get it running with ImportC for x86. That blew up. It seems
that old test suite is doing its job and detecting faults in ImportC! But my
focus is on compiling the code with AArch64, so I'm just filing bug reports on
ImportC to fix later.
Aaaand, I'm making progress getting the AArch64 code generator to work with the
C test suite. A long ways to go yet.
The near term plan:
1. file ImportC bug reports on things in test/runnable/exe1.c that don't work
for x86_64
2. get dmd to compile exe1.c for AArch64 without crashing in the code generator
3. get exe1.c to run on my Raspberry Pi
An awful lot of the code generator has to work in order for (3) to work.
More information about the Digitalmars-d
mailing list