Skip to content

lec08-RISCV指令总结

约 147 个字 11 张图片 预计阅读时间 1 分钟 共被读过

R 型:2S + 1D

image.png

I 型 1IMM + 1S + 1D

image.png
image.png

S 型 1IMM + 2S

image.png

B 型 1IMM+ 2S

image.png

Attention

为了与 16 位的 riscv 兼容,本来可以扩展 2 位(由于对齐的规则,后两位一定是零)结果只能扩展一位(也就是由于历史原因,为了兼容性所做的牺牲)。故可以表示 \(\displaystyle \pm 2^{12-1}\times 2=2^{12}bytes=2^{12}Instructions\)

J 型 1IMM + 1D

image.png

Hint

JALR 是 I 型

image.png

U 型 1IMM + 1D

image.png
将 jump 从 12bytes 扩展为 32bytes 的方法:
image.png
image.png
image.png