TSK3000A Generic Instruction - ADD
Frozen Content
Instruction: Add
Assembler Format | Example | Translates to... |
---|---|---|
add rC, rB | add $3, $4 | add rC, rC, rB (with rA = rC) |
add rC, rA, IMM32 | add $3, $2, 0x12345678 | see note 2 |
add rC, IMM32 (see note 1) | add $3, 0x12345678 | see note 2 |
Notes
- This format can also be written as: add rC, rC, IMM32 (with rA = rC)
- If the signed IMM32 operand fits into a signed 16-bit operand, then these two macro formats translate into single ADDI machine instructions:
add rC, rA, IMM32
translates to.....
addi rC, rA, IMM16
add rC, IMM32
translates to.....
addi rC, rC, IMM16 (with rA = rC)
If the IMM32 operand does not fit, or has an unknown value, then these two macro formats translate to:
li $at, IMM32
add rC, rA, $at