jarl


Jump and register link.

[Syntax]

-

jarl disp22, reg2 (When -Xasm_far_jump option is not specified)

-

jarl disp32, reg2 (When -Xasm_far_jump option is specified)

-

jarl [reg1], reg3

 

The following can be specified for disp22:

-

Absolute expression having a value of up to 22 bits

-

Relative expression having a PC offset reference of label

 

The following can be specified for disp32:

-

Absolute expression having a value of up to 32 bits

-

Relative expression having a PC offset reference of label

[Function]

-

Syntax "jarl disp22, reg2"

Transfers control to the address attained by adding the current program counter (PC) value and the relative or absolute expression value specified by the first operand. The return address is stored in the register specified by the second operand.

-

Syntax "jarl disp32, reg2"

Transfers control to the address attained by adding the current program counter (PC) value and the relative or absolute expression value specified by the first operand. The return address is stored in the register specified by the second operand.

-

Syntax "jarl [reg1], reg3"

This moves control to the address indicated by the register value specified in the first operand, plus the value of the current program counter (PC). The return address is stored in the register specified in the second operand.

[Description]

-

If the instruction is executed in syntax "jarl disp22, reg2", the assembler generates one jarl machine instructionNote if any of the following expressions are specified for disp22.

(a)

Absolute value in the range of -2,097,152 to +2,097,151

(b)

Relative expression that has a PC offset reference of label

Note

The jarl machine instruction takes an immediate value in the range of -2,097,152 to +2,097,151 (0xFE00000 to 0x1FFFFF) as the operand.

 

-

If the instruction is executed in syntax "jarl disp32, reg2", the assembler generates one jarl machine instruction (6-byte long instruction).

-

If the instruction is executed in syntax "jarl [reg1], reg3", the assembler generates one jarl machine instruction.

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

If an absolute expression that exceeds the range of -2,097,152 to +2,097,151 is specified as disp22, the assembler outputs the following message and stops assembling.

E0550230 : illegal operand (range error in displacement)

-

If an absolute expression having an odd-numbered value is specified as disp22/disp32, the assembler outputs the following message and stops assembling.

E0550226 : illegal operand (must be even displacement)

-

If r0 is specified as reg3, the assembler outputs the following message and stops assembling.

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