movhi


Moves higher half-word.

[Syntax]

-

movhi imm16, reg1, reg2

 

The following can be specified for imm16:

-

Absolute expression having a value of up to 16 bits

-

Relative expression

-

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

[Function]

Adds word data for which the higher 16 bits are specified by the first operand and the lower 16 bits are 0, to the value of the register specified by the second operand, and stores the result in the register specified by the third operand.

[Description]

The assembler generates one movhi machine instruction.

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

If an absolute expression having a value exceeding the range of 0 to 65,535 is specified as imm16, the assembler outputs the following message and generates code using the lower 16-bit of imm16.

W0550011 : illegal operand (range error in immediate)

-

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).