Computer Architecture

Key Differences Between ARM and x86 Assembly

01 Dec 20236 min read

One day I had an ARM binary in front of me, and when I tried to look at it through my x86 glasses out of habit, my head was spinning for the first few minutes. Both architectures do the same job—execute instructions—but they do it with completely different philosophies.

CISC and RISC: Two Radically Different Approaches

x86 is a classic CISC (Complex Instruction Set Computing) architecture. A single instruction can perform multiple operations at once (read from memory, do arithmetic, write the result). This makes the code more compact, but the instructions have variable execution times and require a more complex decode mechanism in hardware.

ARM, on the other hand, is designed with the RISC (Reduced Instruction Set Computing) philosophy. Instructions are fixed-length (usually 32-bit) and each instruction typically does one thing. Memory access happens only through LDR (load) and STR (store) instructions; arithmetic operations are not performed directly on memory, they first have to be loaded into a register.

; x86 — read from memory, add, write back, all in one instruction
ADD [ebx], eax

; ARM — first load, then compute, then store
LDR r1, [r0]
ADD r1, r1, r2
STR r1, [r0]

Register Count and Calling Conventions

On x86-64 you have 16 general-purpose registers (RAX, RBX, RCX…). ARM has far more: 32-bit ARM provides 16, while ARM64 (AArch64) gives you 31 general-purpose registers. More registers mean the compiler can keep values in registers instead of spilling them to memory and reading them back, which directly affects performance.

The calling conventions are different too. On x86-64 Linux, arguments are placed in RDI, RSI, RDX, RCX, R8, R9 respectively. On ARM64, this job is done with registers X0 through X7. When you're debugging a binary, not knowing this detail can lead you to search for arguments in the wrong registers and leave you confused for hours—I speak from experience.

Why Does This Matter?

If you're doing mobile application analysis (Android/iOS are largely ARM), working with IoT devices, or even dealing with the increasingly common Apple Silicon and ARM servers (like AWS Graviton) in the desktop/server space, x86 knowledge alone isn't enough. Understanding the logic of both architectures gives you the freedom to read a binary regardless of which platform it came from.

Instead of a Conclusion

ARM and x86 are two architectures that solved the same problem—executing instructions efficiently—with different assumptions. Learning one and skipping the other creates a growing blind spot in today's hardware diversity.

F
Ferivonus
Architecting Systems.
ARMx86AssemblyComputer Architecture