I have recently launched a new OS project for routers and switching devices. I decided to start up by writing an aarch64 (armv8-a) kernel first, then work on x86_64 later on when I feel interested.
Since this is my first time to program 64-bit ARM code, I am really amused. The instruction set is very well designed, and it provides you with a lot of varieties and options. Although the architecture is categorized by people as RISC, you have a good number of instructions and addressing modes that make your programming easy.
At first, I thought that I my assembler code for aarch64 will be as long and verbose as Java , but I was surprised by how I can do most things in a single instruction.
To give you a classical ARM example:
Code: Select all
ADD X3, X1, X2, LSL #40
Compared to x86_64, I feel that aarch64 (as an architecture - in an abstract sense) is more well-designed than amd64. The latter has a lot of technical debt thanks to the long history of x86 architecture; and it feels more complicated and less flexible than the former.
You have got a lot of system registers in aarch64 that help you control the MMU, TLB, caches, exception levels, etc. Virtualization in aarch64 is easier to understand than VT-x and VT-d stuff. By basic understanding of the underlying pipeline, you can write highly-optimized code and you can easily count the cycles.
What do you think guys? Do you have any speculations on the future of the PC architecture? Will we ever have a new series of low-end arm64 computers targeting home users that will supersede the current x86 PC architecture? What about the competition between Intel, AMD, and ARM?
Thanks guys!
QUICK EDIT: seems that my post is wrongly posted to "OS Development". My intention was to put it under "OS Design & Theory". Feel free to move it there if you can. Thanks.