Assembly:

SLL rt, rs, shift

nanoMIPS

Shift Left Logical

Purpose:

Shift Left Logical. Left shift word value in register $rs by amount shift, and place the resultin register $rt.

Availability:

nanoMIPS

Format:

SLL[32]

100000

rt

rs

1100

x

0000

shift

6

5

5

4

3

4

5

NOP[32], EHB, PAUSE, and SYNC instruction formats overlap SLL[32].Opcodes matching those instruction formats should be processed according to the description ofthose instructions, not as

SLL[32].

SLL[16]

001100

rt3

rs3

0

shift3

6

3

3

1

3

rt = decode_gpr(rt3, 'gpr3')
rs = decode_gpr(rs3, 'gpr3')
shift = 8 if shift3 == 0 else shift3

Operation:

result = GPR[rs] << shift
GPR[rt] = sign_extend(result, from_nbits=32)

Exceptions:

None.