darksky
darksky

Reputation: 21059

MIPS Shift Instruction

In an sll instruction in MIPS, it can only take 5-bits. How would the shift work if the shift amount was more than 31? How do we represent that with 5-bits?

Thanks

Upvotes: 0

Views: 1859

Answers (1)

ninjalj
ninjalj

Reputation: 43748

You cannot. SLL is only for 32-bit values, where shifting more than 31 places makes no sense. Use DSLL/DSLL32 or DSLLV for 64-bit values.

Upvotes: 2

Related Questions