movea


Moves execution address.

[Syntax]

-

movea imm, reg1, reg2

 

The following can be specified for imm:

-

Absolute expression having a value of up to 32 bits

-

Relative expression

-

Either of the above expressions with HIGHW, LOWW, or HIGHW1 applied

[Function]

Adds the value of the absolute expression, relative expression, or expression with HIGHW, LOWW, or HIGHW1 applied, 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.

[Description]

-

If the following is specified for imm, the assembler generates one movea machine instructionNote.

(a)

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

movea   imm16, reg1, reg2
movea   imm16, reg1, reg2

(b)

Relative expression having $label for a label having a definition in the sdata/sbss-attribute section

movea   $label, reg1, reg2
movea   $label, reg1, reg2

(c)

Relative expression having !label or %label

movea   !label, reg1, reg2
movea   !label, reg1, reg2
movea   %label, reg1, reg2
movea   %label, reg1, reg2

(d)

Expression with HIGHW, LOWW, or HIGHW1

movea   imm16, reg1, reg2
movea   imm16, reg1, reg2

Note

The movea machine instruction takes an immediate value in a range of -32,768 to +32,767 (0xFFFF8000 to 0x7FFF) as the first operand.

 

-

If the following is specified for imm, the assembler executes instruction expansion to generate one or more machine instructions.

(a)

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

movea   imm, reg1, reg2
movhi   HIGHW(imm), reg1, reg2

Else

movea   imm, reg1, reg2
movhi   HIGHW1(imm), reg1, r1
movea   LOWW(imm), r1, reg2

(b)

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

movea   #label, reg1, reg2
movhi   HIGHW1(#label), reg1, r1
movea   LOWW(#label), r1, reg2
movea   label, reg1, reg2
movhi   HIGHW1(label), reg1, r1
movea   LOWW(label), r1, reg2
movea   $label, reg1, reg2
movhi   HIGHW1($label), reg1, r1
movea   LOWW($label), r1, reg2

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

If r0 is specified by the third operand, the assembler outputs the following message and stops assembling.

E0550240 : Illegal operand (cannot use r0 as destination in RH850 mode).