HACKER Q&A
📣 jez

Resources for learning arm64?


Years ago I took a class that used the textbook Computer Systems: A Programmer’s Perspective[1]. It’s a really great book and it covers lots of topics in systems programming, including assembly using x86_64 for the examples. It taught me a lot about x86_64 even though the primary goal was teaching high-level systems concepts that have stood the test of time.

With all the hype around Apple Silicon these days, I’m curious to learn more about arm64. Do you have favorite resources covering arm64? Some ideas for what I’d find interesting:

- Blog posts comparing arm64 to other instruction sets

- Textbooks or course notes covering arm64; even better with exercises

- “Writing a toy compiler targeting arm64, without using LLVM”

- Readable compiler codebases with an arm64 backend

... or really anything vaguely arm64 related that you thought had good technical depth and was fun to read!

[1] http://www.csapp.cs.cmu.edu/


  👤 johndoe0815 Accepted Answer ✓
The book "ARM 64-Bit Assembly Language" by Larry Pyeatt (ISBN-13 : 978-0128192214) seems to be a useful book. Unlike almost all other books on assembler programming, it doesn't waste dozens of pages on introducing hexadecimal and binary number systems etc. The book also has some examples specific for Raspberry Pi (model 3 and the later BCM2837-based model 2, these should also work for model 4) under Linux and running bare metal.

A short comparison of instruction sets was done by the RISC V guys [1], this is quite concise and IMHO relatively neutral.

I'm currently working on converting my compilers course here at NTNU to target Aarch64 instead of x86-64, but this will take a bit of time until it's finished. My students have to write a small toy compiler (yacc/lex-based) for a procedural language as practical exercises. However, for practical (and cost) reasons, we will mostly target Linux on Aarch64/Raspberry Pi. Though I certainly won't keep my students from writing a Mach-O generating backend :).

[1] Andrew Waterman. Design of the RISC-V Instruction Set Architecture. UCB Technical Report No. UCB/EECS-2016-1. https://people.eecs.berkeley.edu/~krste/papers/EECS-2016-1.p...