<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > ARM指令尋址方式之: 內(nèi)存訪問(wèn)指令尋址

          ARM指令尋址方式之: 內(nèi)存訪問(wèn)指令尋址

          作者: 時(shí)間:2013-09-13 來(lái)源:網(wǎng)絡(luò) 收藏

          本文引用地址:http://www.ex-cimer.com/article/257083.htm

          (2)

          opcode>{cond>}{L} coproc>,CRd>,[Rn>,#±offset_8>*4]

          其中:

          · Rn>為基址寄存器,包含尋址操作的基地址;

          · offset_8>為8位立即數(shù),該值的4倍為地址偏移量。

          (3)操作偽代碼

          If ConditionPassed(cond) then

          If U = = 1 then

          Address = Rn + offset_8 * 4

          Else /*U = = 0*/

          Address = Rn – offset_8 * 4

          Start_address = address

          While (NotFinished(coprocessor[cp_num]))

          Address = address +4

          End_address = address

          (4)說(shuō)明

          如果基址寄存器指定為程序計(jì)數(shù)器r15,則基地址為當(dāng)前執(zhí)行指令地址加8。

          2.[Rn>,#±offset_8>*4]!

          (1)編碼格式

          指令的編碼格式如圖4.37所示。

          圖4.37 協(xié)處理器Load/Store指令——前索引立即數(shù)尋址

          該尋址方式指定一片連續(xù)的內(nèi)存地址空間。訪問(wèn)內(nèi)存單元的第一個(gè)地址first_addressing>等于基址寄存器Rn>的值加上/減去指令中寄存器值的4倍。如果指令的條件域滿足,產(chǎn)生的first_addressing>回寫(xiě)到基址寄存器Rn中。接下來(lái)的內(nèi)存訪問(wèn)地址是前一個(gè)訪問(wèn)地址加4。當(dāng)協(xié)處理器發(fā)出傳輸中止信號(hào)時(shí),數(shù)據(jù)傳送結(jié)束。

          這種尋址方式的數(shù)據(jù)傳輸數(shù)目由協(xié)處理器決定。

          注意

          這種尋址方式最多允許傳輸16的字。

          (2)

          opcode>{cond>}{L} coproc>,CRd>,[Rn>,#±offset_8>*4]!

          其中:

          · Rn>為基址寄存器,包含尋址操作的基地址;

          · offset_8>為8位立即數(shù),該值的4倍為地址偏移量;

          · !設(shè)置指令編碼中的W位,更新指令基地址。

          (3)操作偽代碼

          If ConditionPassed(cond) then

          If U = = 1 then

          Rn = Rn + offset_8 * 4

          Else /*U = = 0*/

          Rn = Rn – offset_8 * 4

          Start_address = Rn

          Address = start_address

          While (NotFinished(coprocessor[cp_num]))

          Address = address +4

          End_address = address

          (4)說(shuō)明

          如果基址寄存器指定為程序計(jì)數(shù)器r15,則指令的執(zhí)行結(jié)果不可預(yù)知。

          3.[Rn>],#±Offset_8>*4

          (1)編碼格式

          指令的編碼格式如圖4.38所示。

          圖4.38 協(xié)處理器Load/Store指令——后索引立即數(shù)尋址

          該尋址方式指定一片連續(xù)的內(nèi)存地址空間。訪問(wèn)內(nèi)存單元的第一個(gè)地址first_addressing>等于基址寄存器Rn>的值。接下來(lái)的內(nèi)存訪問(wèn)地址是前一個(gè)訪問(wèn)地址加4。當(dāng)協(xié)處理器發(fā)出傳輸中止信號(hào)時(shí),數(shù)據(jù)傳送結(jié)束。如果指令的條件域滿足,Rn基址寄存器的值更新為Rn的值加上/減去8位立即數(shù)的4倍。

          這種尋址方式的數(shù)據(jù)傳輸數(shù)目由協(xié)處理器決定。

          注意

          這種尋址方式最多允許傳輸16的字。



          評(píng)論


          相關(guān)推薦

          技術(shù)專(zhuān)區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();