ARM Architecture - Part 1-2
ARM Architecture - Part 1-2
Department of CSE
2024-25 Even semester
Contents
• ARM processor
• Registers and operands
• Instruction formats
ADD X9,X21,X9
STUR X9,[X22,#96]
• Case: the load register instruction must specify two registers and a constant.
• If the address were to use one of the 5-bit fields in the format above, the
largest constant within the load register instruction would be limited to only
25−1 or 31.
• Array size is limited.
• Conflict between the desire to keep all instructions the same length and the
desire to have a single instruction format.
Load/store instructions
Rn: base register
address: constant offset from contents of base register (9
bits address range)
Rt: destination (load) or source (store) register number
SUB X9,X22,X23 // X9 = i − j
CBNZ X9, Else // go to Else if i ≠ j (X9 ≠ 0)
ADD X19,X20,X21 // f = g + h (skipped if i ≠ j)
B Exit // go to Exit
Else:
SUB X19,X20,X21 // f = g − h (skipped if i = j)
Exit: