开发者

A Question about MIPS Instruction

Hey, how to perform an arithmetic right sh开发者_开发问答ift in MIPS instruction set?


SLL and SLLV perform left shifts, but the question was about right shifts. SRA and SRAV perform arithmetic right shifts (with sign bit duplication). SRL and SRLV perform logical right shifts.


There are two instructions that do this: SLL and SLLV.

SLL takes a constant value (encoded in the instruction) and shifts a register by that amount.

SLLV shifts a register by the value stored in another register.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜