Encoding:

POOL32A

000000

rt

rs

rd

sa

000

LSA

001111

POOL32S

010110

rt

rs

rd

sa

100

DLSA

000100

6

5

5

5

2

3

6

Format:

LSA DLSA 

Load Scaled Address, Doubleword Load Scaled Address

LSA rt, rs, rd, sa

microMIPS32 Release 6

Load Scaled Address, Doubleword Load Scaled Address

DLSA rt, rs,rd, sa

microMIPS64 Release 6

Load Scaled Address, Doubleword Load Scaled Address

Purpose:

Load Scaled Address, Doubleword Load Scaled Address

Description:

LSA:  GPR[rd] = sign_extend.32( (GPR[rs] << (sa+1)) + GPR[rt] )
DLSA: GPR[rd] = (GPR[rs] << (sa+1)) + GPR[rt]

LSA adds two values derived from registers rs and rt, with a scaling shift on rs. The scaling shift is formed by adding 1 to the 2-bit sa field, which is interpreted as unsigned. The scaling left shift varies from 1 to 5, corresponding to multiplicative scaling values of <=2, <=4, <=8, <=16, bytes, or 16, 32, 64, or 128 bits.

LSA is a MIPS32 compatible instruction, sign extending its result from bit 31 to bit 63.

DLSA is a MIPS64 compatible instruction, performing the scaled index calculation fully 64-bits wide.

Restrictions:

LSA: None

DLSA: Reserved Instruction exception if 64-bit instructions are not enabled.

Availability and Compatibility:

LSA instruction is introduced by and required as of Release 6.

DLSA instruction is introduced by and required as of Release 6.

Operation

LSA:  GPR[rd] = sign_extend.32( GPR[rs] << (sa+1) + GPR[rt] )
DLSA: GPR[rd] = GPR[rs] << (sa+1) + GPR[rt]

Exceptions:

LSA: None

DLSA: Reserved Instruction