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

来源:互联网 发布:udp和tcp的端口号 编辑:程序博客网 时间:2024/06/05 03:39



 

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时钟轮训拉取,编码,处理每个指令,回写下一个指令地址:


 

0 0
原创粉丝点击