首页 日常

ISA 指令集框架

The Instruction Set Architecture (ISA) is the part of the processor that is visible to the programmer or compiler writer. The ISA serves as the boundary between software and hardware.

就是一个软硬件之间的框架

The 3 most common types of ISAs are:

  1. Stack - The operands are implicitly on top of the stack.
  2. Accumulator - One operand is implicitly the accumulator.
  3. General Purpose Register (GPR) - All operands are explicitely mentioned, they are either registers or memory locations.

Lets look at the assembly code of

C = A + B;

in all 3 architectures:

StackAccumulatorGPR
PUSH ALOAD ALOAD R1,A
PUSH BADD BADD R1,B
ADDSTORE CSTORE R1,C
POP C--

三个最常见的操作类型,栈,累加器和GPR(通用寄存器)

其中对GPR的解释是要么是内存位置,要么是寄存器,

http://www.cs.kent.edu/~durand/CS0/Notes/Chapter05/isa.html




文章评论