Data is loaded (short format).
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. |
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.
The assembler generates one sld machine instruction. Base register specification "[ep]" can be omitted.
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. |
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. |
If r0 is specified as the second operand of the sld.bu and sld.hu, the assembler outputs the following message and stops assembling. |