6.1. Instruction mnemonics

The A64 assembly language overloads instruction mnemonics, and distinguishes between the different forms of an instruction based on the operand register names. For example, the ADD instructions below all have different encodings, but you only have to remember one mnemonic, and the assembler automatically chooses the correct encoding based on the operands.

  ADD W0, W1, W2             // add 32-bit registers
  ADD X0, X1, X2             // add 64-bit registers
  ADD X0, X1, W2, SXTW       // add sign extended 32-bit register to 64-bit extended 
   					         // register
  ADD X0, X1, #42            // add immediate to 64-bit register
  ADD V0.8H, V1.8H, V2.8H    // NEON 16-bit add, in each of 8 lanes
Copyright © 2015 ARM. All rights reserved.ARM DEN0024A