Reading about ARM architecture I found many similarities to PDP-11 architecture which did not exist between ARM and x86.
For example,
-
General-purpose registers named Rx compared to AX, BX,… for x86
-
Uniform registry file (all registers permit all kinds of operations)
-
Similar names for program counter (PC both on ARM and PDP), compared to IP in x86.
-
Inclusion of Program Counter into general registry file (in PDP it also can be refereed to as R7, in ARM – as R15, both the last registers in the file).
-
Inclusion of I/O ports into general address space (i.e. addressing them as memory) compared to a separated I/O address space in x85 (and special I/O instructions).
-
Using 3-letter basic assembler mnemonics (TST compared to “test” in x86) with suffixes specifying data type (such as “B” for byte, compared to constructions like “byte ptr” in x86)
-
Using BNE, BEQ and other B condition instructions for branches.
-
Use of “#” symbol before a number to specify an immediate value (compared to “.” in x86)
-
Auto-increment and auto-decrement addressing modes.
etc. So is there any historical relationship between ARM and PDP that makes them closer to each other than to x86?
5
I don’t know how much the designers of the ARM architecture took inspiration from the PDP-11. They probably knew the PDP-11 architecture well as it was one of the major CPUs of the 1970s. However, it’s more the x86 which is different from the other two.
ARM is a RISC architecture: its instructions tend to follow a few model and to do just one thing. Compare with MIPS which is pretty much textbook RISC. Both PDP-11 and x86 are CISC, with many instructions combining several operations (e.g. a load and a store, or a memory access plus an arithmetic operation). In some aspects, the PDP-11 was a forerunner of RISC, in particular with its fairly orthogonal instruction set (e.g. the main registers, including the program counter, are general-purpose registers usable with any instruction).
Naming the general-purpose registers Rx is pretty natural. X86 doesn’t do this because almost all its registers have a special purpose (even ax through dx have some specificities, e.g. multiplication that can only be ax*dx).
Using special instructions or a memory mapping for I/O is related to how the I/O unit connects to the CPU. If I/O goes through the same bus as RAM, it’s natural to use a memory mapping and let the memory bus controller dispatch the signals. If I/O goes on a separate bus, it’s natural to have separate instructions, with the CPU doing the dispatching right off the bat.
B for branching isn’t specific to PDP and ARM. There are two x86 assembly syntaxes: AT&T syntax and Intel syntax. mov byte ptr [ax], bx
is Intel syntax; the corresponding AT&T syntax is movl (%bx), %ax
. The AT&T syntax is closer to major assembly languages used today.
1
The two assembly languages have similarities, as mentioned previously. But their concept is different.
PDP11 was famous of its many addressing modes, which is not true for ARM. Also, PDP was microcoded, the ARM CPUs are not microcoded in the classical sense. They use hardwired logic for fetch and decoding.
1