Everything

satsub


-

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

-

SATSUB reg1, reg2

-

SATSUB reg1, reg2, reg3

 

-

In asrh, the following formats can also be used in addition to the above.

-

satsub imm, reg2

 

-

If the instruction is executed in syntax "satsub imm, reg2", the assembler executes instruction expansion to generate one or more machine instructions.

(a)

0

Format

Result of Assembly

satsub  0, reg
satsub  r0, reg

(b)

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

Format

Result of Assembly

satsub  imm16, reg
satsubi imm16, reg, reg

(c)

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

Format

Result of Assembly

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

 

Else

Format

Result of Assembly

satsub  imm, reg
mov     imm, r1
satsub  r1, reg

(d)

Relative expression having !label or %label, or that having $label for a label having a definition in the sdata/sbss-attribute section

Format

Result of Assembly

satsub  !label, reg
satsubi !label, reg, reg
satsub  %label, reg
satsubi %label, reg, reg
satsub  $label, reg
satsubi $label, reg, reg

(e)

Relative expression having #label or label, or that having $label for a label having no definition in the sdata/sbss-attribute section

Format

Result of Assembly

satsub  #label, reg
mov     #label, r1
satsub  r1, reg
satsub  label, reg
mov     label, r1
satsub  r1, reg
satsub  $label, reg
mov     $label, r1
satsub  r1, reg