ld23


Data is loaded.

[Syntax]

-

ld23.b disp23[reg1], reg2

-

ld23.h disp23[reg1], reg2

-

ld23.w disp23[reg1], reg2

-

ld23.bu disp23[reg1], reg2

-

ld23.hu disp23[reg1], reg2

-

ld23.dw disp23[reg1], reg2

Note

For ld23.dw instruction, the mnemonic ld.dw can be used.

 

The following can be specified for displacement (disp):

-

Absolute expression having a value of up to 23 bits

-

Relative expression

-

Relative expression having #label with LOWW applied (for ld.23.dw)

[Function]

The ld23.b, ld23.bu, ld23.h, ld23.hu, and ld23.w instructions load data of 1 byte, 1 halfword, and 1 word, from the address specified by the first operand, int the register specified by the second operand. The ld23.dw instruction loads a double word of data from the address specified in the first operand, then register reg2 specified in the second operand into the lower 32 bits, and reg2 + 1 into the upper 32 bits.

[Description]

-

The assembler generates a 48-bit ldNote instruction in machine language.

Note

The ld machine instruction takes an immediate value in the range of -4,194,304 to +4,194,303 (0xFFC00000 to 0x3FFFFF) as the displacement

 

-

If disp23 is omitted, the assembler assumes 0.

-

If an absolute expression, a relative expression having !label, a relative expression having #label is specified as disp23, [reg1] can be omitted. If omitted, the assembler assumes that [r0] is specified.

-

If a relative expression having $label is specified as disp23, [reg1] can be omitted. If omitted, the assembler assumes that [gp] is specified.

-

If a relative expression having %label is specified as disp23, [reg1] can be omitted. If omitted, the assembler assumes that [ep] is specified.

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

ld23.b and ld23.h sign-extend the data of 1 byte and 1 halfword, respectively, and load the data into a register as 1 word.

-

If a value that is not a multiple of 2 is specified as disp of ld23.h, ld23.w, ld23.hu, or ld23.dw, the assembler aligns disp with 2 and generates a code. Then, the assembler outputs the following messages.

W0550019 : Illegal operand (immediate must be multiple of 2).

-

A message is output if an odd-numbered register is specified in the second operand of the ld23.dw instruction.

W0550026 : Illegal register number, aligned odd register(reg) to be even register(reg-1).