satadd


-

The satadd instructions of the device should be specified in the following formats.

-

SATADD reg1, reg2

-

SATADD imm5, reg2

-

SATADD reg1, reg2, reg3

 

-

If the following is specified for imm in syntax "satadd imm, reg2", the assembler executes instruction expansion to generate multiple machine instructions.

(a)

Absolute expression exceeding the range of -16 to +15, but within the range of -32,768 to +32,767

satadd  imm16, reg
movea   imm16, r0, r1
satadd  r1, reg

(b)

Absolute expression having a value exceeding the range of -32,768 to +32,767

If all the lower 16 bits of the value of imm are 0

satadd  imm, reg
movhi   HIGHW(imm), r0, r1
satadd  r1, reg

 

Else

satadd  imm, reg
mov     imm, r1
satadd  r1, reg

(c)

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

(d)

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