1
2018
RISC-V 手册
一本开源指令集的指南
DAVID PATTERSON, ANDREW WATERMAN
翻译:勾凌睿、黄成、刘志刚
校阅:包云岗
1
参考卡
2
3
目录
参考卡 ..................................................................................................................................................... 1
致谢 ......................................................................................................................................................... 7
关于作者 ................................................................................................................................................. 9
前言 .......................................................................................................................................................10
译者序 ...................................................................................................................................................12
翻译团队 ................................................................................................................................................ 12
第一章 为什么要有 RISC-V? ..........................................................................................................13
1.1 导言 ................................................................................................................................................. 13
1.2 模块化与增量型 ISA ................................................................................................................... 14
1.3 ISA 设计 101 ................................................................................................................................. 15
1.4 全书的总览 .................................................................................................................................... 19
1.5 结束语 ............................................................................................................................................. 20
1.6 扩展阅读 ........................................................................................................................................ 21
第二章 RV32I:RISC-V 基础整数指令集 ......................................................................................23
2.1 导言 ................................................................................................................................................. 23
2.2 RV32I 指令格式 ............................................................................................................................. 23
2.3 RV32I 寄存器 ................................................................................................................................. 26
2.4 RV32I 整数计算 ............................................................................................................................. 27
2.5 RV32I 的 Load 和 Store .............................................................................................................. 29
2.6 RV32I 条件分支 ............................................................................................................................. 30
2.7 RV32I 无条件跳转 ........................................................................................................................ 31
2.8 RV32I 杂项 ...................................................................................................................................... 31
2.9 使用插入排序比较 RV32I,ARM-32,MIPS-32 和 x86-32 指令集 ........................... 32
2.10 结束语 .......................................................................................................................................... 32
2.11 扩展阅读 ...................................................................................................................................... 33
第三章 RISC-V 汇编语言 ..................................................................................................................41
3.1 导言 ................................................................................................................................................. 41
3.2 函数调用规范(Calling convention) ................................................................................. 41
3.3 汇编器 ............................................................................................................................................. 43
3.4 链接器 ............................................................................................................................................. 46
3.5 静态链接和动态链接 ................................................................................................................. 49
3.6 加载器 ............................................................................................................................................. 49
3.7 结束语 ............................................................................................................................................. 49