Professional Documents
Culture Documents
Notations
Rd Destination register d
d may be any register R0 – R15
MOVS R0, R1
31 · · · 28 24 · · · 21 20 15 · · · 12 3···0
hS i True (1)
Set the condition codes (N and Z)
N is true if value is Negative
Z is true if value is Zero
Rd R0 = 0000
Destination Register
Rm R1 = 0001
Source Register
Instruction Groups
1 Data Movement
2 Arithmetic
3 Memory Access
4 Logical
5 Flow Control
6 System Control
Data Movement
• 50% to 70% of a program
Arithmetic
• Addition
ADDhccihS i Rd, Rn, hop1i hcc i: Rd ← Rn + hop1i
hcc ihS i: CPSR ← ALU(Flags)
• Subtraction
SUBhccihS i Rd, Rn, hop1i hcc i: Rd ← Rn − hop1i
hcc ihS i: CSPR ← ALU(Flags)
• Multiplication
MULhccihS i Rd, Rn, Rs hcc i: Rd ← Rn × Rs
hcc ihS i: CSPR ← ALU(Flags)
• Division
There is no division instruction
Advanced Arithmetic
• Used to calculate values larger than 32-Bits
Memory Access
Data Movement
Arithmetic
Address
Incrementer
R15 / PC R11 R7 R3
R14 / LR R10 R6 R2
R13 / SP R9 R5 R1
R12 R8 R4 R0
User Registers
Booth's
Multiplier
Barrel IR
Shifter Control
Unit
CPSR
32-Bit ALU