switch


Table reference branch.

[Syntax]

-

switch reg

[Function]

Performs processing in the following sequence.

(1)

Adds the value resulting from logically shifting the value specified by the operand 1 bit to the left to the first address of the table (address following the switch instruction) to generate a table entry address.

(2)

Loads signed halfword data from the generated table entry address.

(3)

Logically shifts the loaded value 1 bit to the left and sign-extends it to word length. Then adds the first address of the table to it to generate an address

(4)

Branches to the generated address.

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

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

E0550239 : Illegal operand (cannot use r0 as source in RH850 mode).