![MIPS32指令集(多來源_格式整齊)_第1頁](http://file4.renrendoc.com/view/039b02a243b0373aebd309b133c3e8fe/039b02a243b0373aebd309b133c3e8fe1.gif)
![MIPS32指令集(多來源_格式整齊)_第2頁](http://file4.renrendoc.com/view/039b02a243b0373aebd309b133c3e8fe/039b02a243b0373aebd309b133c3e8fe2.gif)
![MIPS32指令集(多來源_格式整齊)_第3頁](http://file4.renrendoc.com/view/039b02a243b0373aebd309b133c3e8fe/039b02a243b0373aebd309b133c3e8fe3.gif)
![MIPS32指令集(多來源_格式整齊)_第4頁](http://file4.renrendoc.com/view/039b02a243b0373aebd309b133c3e8fe/039b02a243b0373aebd309b133c3e8fe4.gif)
![MIPS32指令集(多來源_格式整齊)_第5頁](http://file4.renrendoc.com/view/039b02a243b0373aebd309b133c3e8fe/039b02a243b0373aebd309b133c3e8fe5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、MIPS32指令集MIPS指令可以分成以下各類:空操作no-op;寄存器寄存器傳輸:用得很廣,包括條件傳輸在內(nèi);常數(shù)加載:作為數(shù)值和地址的整型立即數(shù);算術(shù)邏輯指令;整數(shù)乘法、除法和求余數(shù);整數(shù)乘加;加載和存儲(chǔ);跳轉(zhuǎn)、子程序調(diào)用和分支;斷點(diǎn)和自陷;CP0功能:CPU控制指令浮點(diǎn);用戶態(tài)的受限訪問:rdhwr和synci注:64位版本開頭以“d”表示,無符號(hào)數(shù)以“u”結(jié)尾,立即數(shù)通常以“i”結(jié)尾,字節(jié)操作以“b”結(jié)尾,雙字操作以“d”結(jié)尾,字操作以“w”結(jié)尾1、空操作:nop:相當(dāng)于sllzero,zero,o,ssnop:equalssllzero,zero,1.這個(gè)指令不得與其它指令同時(shí)發(fā)送,
2、這樣就保證了其運(yùn)行要花費(fèi)至少一個(gè)時(shí)鐘周期。這在簡(jiǎn)單的流水線的CPU上無關(guān)緊要,但在復(fù)雜些的實(shí)現(xiàn)上對(duì)于實(shí)現(xiàn)強(qiáng)制的延時(shí)很有用。2、寄存器寄存器傳送:move:通常用跟$zero寄存器的or來實(shí)現(xiàn),或者用addu。movf,movt,movn,movz:條件傳送。3、常數(shù)加載:dla、la:用來加載程序中某些帶標(biāo)號(hào)的位置或者變量的地址的宏指令;dli、li:裝入立即數(shù)常數(shù),這是一個(gè)宏指令;lui:把立即數(shù)加載到寄存器高位。4、算術(shù)邏輯運(yùn)算:add、addi、dadd、daddi、addu、addiu、daddu、daddiu、dsub、sub、subu:加法扌旨令和減法指令;abs,dabs:絕對(duì)值
3、;dneg、neg、negu:取相反數(shù);and、andi、or、ori、xor、nor:逐位邏輯操作指令;drol、rol、ror:循環(huán)移位指令;sll、srl、sra:移位。5、條件設(shè)置指令:sit、slti、sltiu、situ、seq、sge、sle、sne:條件設(shè)置。6、整數(shù)乘法、除法和求余數(shù):div、mul、rem等等。7、整數(shù)乘加(累加)mad等。8、加載和存儲(chǔ):lb、ld、ldl、ldr、sdl、sdr、lh、lhu、ll、sc、pref、sb等操作。9、浮點(diǎn)加載和存儲(chǔ):l.d、l.s、s.d、s.s等常用MIPS指令集及格式:0000srl000000rt0rdsham0000
4、10000sra000000rt0rdsham00001sllv000000rsrtrd000000010srlv000000rsrtrd000000011srav000000rsrtrd00000001100jr000000rs0000000000000100I-typoprsertimmediateaddi001000rsrtimmediateaddiu001001rsrtimmediateandi001100rsrtimmediateori001101rsrtimmediatexori001110rsrtimmediatelui0000001111rtimmediate0lw100011
5、rsrtimmediatesw101011rsrtimmediate更全的MIPS匯編指令A(yù)rithmeticInstructionsabsdes,srcl#desgetstheabsolutevalueofsrcl.add(u)des,src1,src2#desgetssrc1+src2.addi$t2,$t3,5#$t2=$t3+5加16位立即數(shù)addiu$t2,$t3,5#$t2=$t3+5加16位無符號(hào)立即數(shù)sub(u)des,src1,src2#desgetssrc1-src2.div(u)src1,reg2#Dividesrc1byreg2,leavingthequotientin
6、registerloandtheremainderinregisterhi.div(u)des,src1,src2#desgetssrc1/src2.muldes,src1,src2#desgetssrc1*src2.mulodes,srcl,src2#desgetssrcl*src2,withoverflow.mult(u)srcl,reg2#Multiplysrclandreg2,leavingthelow-orderwordinregisterloandthehigh-orderwordinregisterhi.rem(u)des,srcl,src2#desgetstheremainde
7、rofdividingsrclbysrc2.neg(u)des,srcl#desgetsthenegativeofsrcl.anddes,srcl,src2#desgetsthebitwiseandofsrclandsrc2.nordes,srcl,src2#desgetsthebitwiselogicalnorofsrclandsrc2.notdes,srcl#desgetsthebitwiselogicalnegationofsrcl.ordes,srcl,src2#desgetsthebitwiselogicalorofsrclandsrc2.xordes,srcl,src2#desge
8、tsthebitwiseexclusiveorofsrclandsrc2.roldes,srcl,src2#desgetstheresultofrotatingleftthecontentsofsrclbysrc2bits.rordes,srcl,src2#desgetstheresultofrotatingrightthecontentsofsrclbysrc2bits.slldes,srcl,src2#desgetssrclshiftedleftbysrc2bits.srades,srcl,src2#Rightshiftarithmetic.srldes,srcl,src2#Rightsh
9、iftlogical.sllvdes,srcl,src2#$t0=$t1$t3,shiftrightlogicalsravdes,srcl,src2#$t0=$t1$t3,shiftrightarithm.ComparisonInstructionsseqdes,src1,src2#des1ifsrc1=src2,0otherwise.snedes,src1,src2#des1ifsrc1!=src2,0otherwise.sge(u)des,src1,src2#des1ifsrc1=src2,0otherwise.sgt(u)des,src1,src2#des1ifsrc1src2,0oth
10、erwise.sle(u)des,src1,src2#des1ifsrc1=src2,0otherwise.slt(u)des,src1,src2#des1ifsrc1=src2.bgt(u)src1,src2,lab#Branchtolabifsrc1src2.ble(u)src1,src2,lab#Branchtolabifsrc1=src2.blt(u)src1,src2,lab#Branchtolabifsrc1=0.bgtzsrc1,lab#Branchtolabifsrc10.blezsrc1,lab#Branchtolabifsrc1=0.bltzsrc1,lab#Brancht
11、olabifsrc1=0,thenputtheaddressofthenextinstruction#into$raandbranchtolab.bgtzalsrc1,lab#Ifsrc10,thenputtheaddressofthenextinstruction#into$raandbranchtolab.bltzalsrc1,lab#Ifsrc10,thenputtheaddressofthenextinstruction#into$raandbranchtolab.jlabel#Jumptolabellab.jrsrc1#Jumptolocationsrc1.jallabel#Jump
12、tolabellab,andstoretheaddressofthenextinstructionin$ra.jalrsrc1#Jumptolocationsrc1,andstoretheaddressofthenextinstructionin$ra.Load,Store,andDataMovement(reg)$Contentsofreg.const$Aconstantaddress.const(reg)$const+contentsofreg.symbol$Theaddressofsymbol.symbol+const$Theaddressofsymbol+const.symbol+co
13、nst(reg)$Theaddressofsymbol+const+contentsofreg.lades,addr#Loadtheaddressofalabel.lb(u)des,addr#Loadthebyteataddrintodes.lh(u)des,addr#Loadthehalfwordataddrintodes.lides,const#Loadtheconstantconstintodes.luides,const#Loadtheconstantconstintotheupperhalfwordofdes,#andsetthelowerhalfwordofdesto0.lwdes
14、,addr#Loadthewordataddrintodes.lwldes,addrlwrdes,addrulh(u)des,addr#Loadthehalfwordstartingatthe(possiblyunaligned)addressaddrintodes.ulwdes,addr#Loadthewordstartingatthe(possiblyunaligned)addressaddrintodes.sbsrc1,addr#Storethelowerbyteofregistersrc1toaddr.shsrc1,addr#Storethelowerhalfwordofregiste
15、rsrc1toaddr.swsrc1,addr#Storethewordinregistersrc1toaddr.swlsrc1,addr#Storetheupperhalfwordinsrctothe(possiblyunaligned)addressaddr.swrsrc1,addr#Storethelowerhalfwordinsrctothe(possiblyunaligned)addressaddr.ushsrc1,addr#Storethelowerhalfwordinsrctothe(possiblyunaligned)addressaddr.uswsrc1,addr#Storethewordinsrctothe(possiblyunaligned)addressaddr.movedes,src1#Copythecontentsofsrc1todes.mfhides#Copythecontentsofthehiregistertodes.mflodes#Copythecontentsoftheloregistertodes.mthisrc1#Copythecontentsoft
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 書購銷協(xié)議合同范本
- 2025年度建筑工程質(zhì)量檢測(cè)合作施工合同規(guī)范文本
- 企業(yè)銷售培訓(xùn)合同范本
- 2025年度快遞企業(yè)間貨物運(yùn)輸委托合同(新版)
- 住房申請(qǐng)書 范文
- 2025年對(duì)硫磷項(xiàng)目可行性研究報(bào)告
- 入團(tuán)申請(qǐng)書800字左右
- 個(gè)人工資申請(qǐng)書
- 中國(guó)物理農(nóng)業(yè)行業(yè)市場(chǎng)發(fā)展監(jiān)測(cè)及投資前景展望報(bào)告
- 2025年度智能物聯(lián)網(wǎng)系統(tǒng)解決方案技術(shù)服務(wù)合同
- 新能源整車裝配工藝培訓(xùn)的資料課件
- 房車露營(yíng)地的研究課件
- 園藝療法共課件
- DB33T 628.1-2021 交通建設(shè)工程工程量清單計(jì)價(jià)規(guī)范 第1部分:公路工程
- 醫(yī)院-9S管理共88張課件
- 設(shè)立登記通知書
- 2022醫(yī)學(xué)課件前列腺炎指南模板
- MySQL數(shù)據(jù)庫項(xiàng)目式教程完整版課件全書電子教案教材課件(完整)
- 藥品生產(chǎn)質(zhì)量管理工程完整版課件
- 《網(wǎng)絡(luò)服務(wù)器搭建、配置與管理-Linux(RHEL8、CentOS8)(微課版)(第4版)》全冊(cè)電子教案
- 職業(yè)衛(wèi)生教學(xué)課件生物性有害因素所致職業(yè)性損害
評(píng)論
0/150
提交評(píng)論