Computer Science 學習第四章--CPU 指令集及指令處理

來源:互聯網
上載者:User

標籤:style   blog   http   io   ar   sp   2014   on   cti   



 

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時鐘輪訓拉取,編碼,處理每個指令,回寫下一個指令地址:


 

Computer Science 學習第四章--CPU 指令集及指令處理

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.