Instructions: Language of the
2022-12-27 本文已影响0人
刘东利2020
2.2 Operations of the Computer Hardware
这一节是讲RISC-V指令集。看一个示例:

“//”后面是注释。从这个示例可以看出:
The natural number of operands for an operation like addition is three: the two numbers being added together and a place to put the sum. Requiring every instruction to have exactly three operands, no more and no less, conforms to the philosophy of keeping the hardware simple: hardware for a variable number of operands is more complicated than hardware for a fixed number.
作者接着提出了硬件设计的三大原则中的第一条:
Design Principle 1: Simplicity favors regularity.
一些RISC-V的指令集及示例:

