dmd Arm64 - first function compile!
Temtaime
temtaime at gmail.com
Mon Jun 3 18:58:48 UTC 2024
On Sunday, 2 June 2024 at 06:30:18 UTC, Walter Bright wrote:
> In recent days, it has become abundantly clear that the x86
> architecture appears to be headed for obsolescence. The Arm
> processor is taking over. The Mac is dropping the x86 in favor
> of Arm. Microsoft has announced Arm laptops.
>
> Even my Raspberry Pi is an Arm64.
>
> What to do about dmd? Many people in the D community have
> expressed interest in creating an Arm backend for D. Since
> implementing a 64 bit code generator is trivial, I thought I'd
> look into it.
>
> I bought a couple books on the Arm, and have been studying the
> datasheet for it. Most of the backend can be repurposed to Arm.
> The structure of it can remain the same.
>
> The goal is Arm64, not Arm32. Since even the Pi is Arm64, there
> is no purpose in supporting the Arm32.
>
> Hacking away listening to Brain Pain metal, the first function
> compiles:
>
> ```
> void foo() { }
> ```
>
> dmd -c test.d -vasm
>
> producing:
>
> ```
> _D4test3fooFZv:
> 0000: D6 5F 03 C0 ret
> ```
>
> And there it is! Nothing else works, but what the heck.
>
> https://github.com/WalterBright/dmd/commit/04546a8f72c10a09764f23675c67c5fbdf29628c
Adding new features is always exciting, but it is crucial to
ensure that these features are fully developed and bring real
value to the users. Incomplete features can lead to confusion and
frustration, ultimately hindering productivity rather than
enhancing it.
I would like to urge the development team to reconsider the
current strategy and prioritize the completion and perfection of
existing features before introducing new ones. By doing so, we
can ensure a more robust, reliable, and user-friendly programming
language.
GDC and LDC already support arm and optimize the code perfectly.
Instead of introducing yet another redundant feature, I believe
our focus should be on refining and optimizing the existing ones.
This approach would not only enhance the stability of our
language but also improve the overall user experience.
More information about the Digitalmars-d
mailing list