Computer Science 学习第四章--CPU 指令集和指令处理



 

Instruction set

Y86 指令集

 

运算符:addl, subl, andl, and xorl

跳转符:jmp,jle,jl,je,jne,jge, andjg

条件符:cmovle, cmovl, cmove, cmovne, cmovge,cmovg

其它:call , pushl,popl, halt

 

Registers

%eax, %ecx, %edx, %ebx, %esi, %edi, %esp, %ebp

当中栈指针存在%esp

PC存放当前指令的地址

 

Condition code (状态码)

 

1.  指令运行正常

2.  挂起

3. 读写非法地址

4. 非法指令


 

Instruction encoding

 

指令集编码。汇编指令集被运行前。寄存器会被编码:


比如。addl %esi %eax 会被编码为 addl 6 0

 

Logic control (execution)

 


 

ALU


 

 

Clocked register

时钟信号存放寄存器载入情况。

 

Random Access memory

1.Register file (寄存器)

 

寄存器的读写


 

2.Virtual memory (内存)

 

Instruction processing

指令处理分为Fetch, Decode, Execute, Write Memory 和PC update 五个阶段.

 

指令处理过程:

Fetch -> decode -> execute -> write back -> PC update(point to next instruction address)


 

Instruction Cycling processing

CPU时钟轮训拉取。编码。处理每一个指令,回写下一个指令地址:


 

版权声明:本文博客原创文章,博客,未经同意,不得转载。

posted @ 2015-08-20 15:29  yxwkaifa  阅读(327)  评论(0编辑  收藏  举报