The following can be specified for imm:
Adds the value of the register specified by the first operand to the value of the register specified by the second operand, and stores the result in the register specified by the second operand. If the result exceeds the maximum positive value of 0x7FFFFFFF, however, 0x7FFFFFFF is stored in the register specified by the second operand. Likewise, if the result exceeds the maximum negative value of 0x80000000, 0x80000000 is stored in the register specified by the second operand. In both cases, the SAT flag is set to 1.
Adds the value of the absolute expression or relative expression specified by the first operand to the value of the register specified by the second operand, and stores the result in the register specified by the second operand. If the result exceeds the maximum positive value of 0x7FFFFFFF, however, 0x7FFFFFFF is stored in the register specified by the second operand. Likewise, if the result exceeds the maximum negative value of 0x80000000, 0x80000000 is stored in the register specified by the second operand. In both cases, the SAT flag is set to 1.
Adds the value of the register specified by the first operand to the value of the register specified by the second operand, and stores the result in the register specified by the third operand. If the result exceeds the maximum positive value of 0x7FFFFFFF, however, 0x7FFFFFFF is stored in the register specified by the second operand. Likewise, if the result exceeds the maximum negative value of 0x80000000, 0x80000000 is stored in the register specified by the third operand. In both cases, the SAT flag is set to 1.
If the instruction is executed in syntax "satadd reg1, reg2" or "satadd reg1, reg2, reg3", the assembler generates one satadd machine instruction. |
If the following is specified for imm in syntax "satadd imm, reg2", the assembler generates one satadd machine instructionNote. |
The satadd machine instruction takes a register or immediate value in the range of -16 to +15 (0xFFFFFFF0 to 0xF) as the first operand. |
If the following is specified for imm in syntax "satadd imm, reg2", the assembler executes instruction expansion to generate multiple machine instructions. |
Absolute expression exceeding the range of -16 to +15, but within the range of -32,768 to +32,767 |
If all the lower 16 bits of the value of imm are 0
Relative expression having !label or %label, or that having $label for a label having a definition in the sdata/sbss-attribute section |
satadd !label, reg |
movea !label, r0, r1 satadd r1, reg |
satadd %label, reg |
movea %label, r0, r1 satadd r1, reg |
satadd $label, reg |
movea $label, r0, r1 satadd r1, reg |
Relative expression having #label or label, or that having $label for a label having no definition in the sdata/sbss-attribute section |
satadd #label, reg |
mov #label, r1 satadd r1, reg |
satadd label, reg |
mov label, r1 satadd r1, reg |
satadd $label, reg |
mov $label, r1 satadd r1, reg |
If the instruction is executed in syntax "satadd reg1, reg2" or "satadd imm, reg2", if r0 is specified as the second operand, the assembler outputs the following message and stops assembling. |