sld


Data is loaded (short format).

[Syntax]

-

sld.b disp7[ep], reg2

-

sld.h disp8[ep], reg2

-

sld.w disp8[ep], reg2

-

sld.bu disp4[ep], reg2

-

sld.hu disp5[ep], reg2

 

The following can be specified for displacement (disp4/5/7/8):

-

Absolute expression having a value of up to 7 bits for sld.b, 8 bits for sld.h and sld.w, 4 bits for sld.bu, and 5 bits for sld.hu.

-

Relative expression

[Function]

The sld.b, sld.bu, sld.h, sld.hu, and sld.w instructions load the data of 1 byte, 1 halfword, and 1 word, from the address obtained by adding the displacement specified by the first operand to the contents of register ep, to the register specified by the second operand.

[Description]

The assembler generates one sld machine instruction. Base register specification "[ep]" can be omitted.

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

sld.b and sld.h sign-extend and store data of 1 byte and 1 halfword, respectively, in the register as 1 word.

-

If a value that is not a multiple of 2 is specified as disp8 of sld.h or disp5 of sld.hu, and if a value that is not a multiple of 4 is specified as disp8 of sld.w, the assembler aligns disp8 or disp5 with multiples of 2 and 4, respectively, and generates a code. Then, the assembler outputs the following messages.

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

 

-

If a value exceeding 127 is specified for disp7 of sld.b, a value exceeding 255 is specified for disp8 of sld.h and sld.w, a value exceeding 16 is specified for disp4 of sld.bu, and a value exceeding 32 is specified for disp5 of sld.hu, the assembler outputs the following message, and generates code in which disp7, disp8, disp4, and disp5 are masked with 0x7F, 0xFF, 0xF, and 0x1F, respectively.

W0550011 : Illegal operand (range error in immediate).

-

If r0 is specified as the second operand of the sld.bu and sld.hu, the assembler outputs the following message and stops assembling.

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