12-31-2021

64 bits ARM assembly language (aarch64)

ARMv8 implements aarch64 (or can if it wants to). It can implement 32 bit ARM or 64 bit ARM or both. Which state it boots up in is implemntation dependent.

64 bit ARM is known as AArch64 (and correspondingly 32 bit ARM as AArch32, but you rarely see that). AArch64 is quite different from AArch32. The obvious and expected thing is that registers are 64 bit (but you can get at them in a 32 bit fashion as well). You also get more of them (32 rather than 16). And the stack pointer is now register 31 all of them time (rather than just being r13 by convention). On top of that, register 31 serves as a zero register for most instructions. In ARM 64 (properly called AArch64) the PC is its own special thing and not one of the registers. In fact, the PC is not accessible in a general way in AArch64. There is more of course, but this is not the place for it. I simply include this discussion to point out how different it is.

Someday I will work up a concise summary with more details, but for now here are some interesting links:

And this nice presentation: As important as the instruction set itself are the details about how compilers make use of the instruction set. In other words, the details of the ABI are important and interesting.
Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]