中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        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.antipu.com.cn/article/257083.htm

        9.[Rn],±Rm,shift># offset_12>]

        (1)編碼格式

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

        圖4.22 內(nèi)存訪問(wèn)指令——帶移位的后索引寄存器偏移尋址編碼格式

        實(shí)際的內(nèi)存訪問(wèn)地址為寄存器Rn的值。當(dāng)指令的執(zhí)行條件滿足時(shí),將基址寄存器值加/減一個(gè)地址偏移量產(chǎn)生新的地址值。

        (2)

        有以下5種。

        LDR|STR{cond>}{B}{T} Rd>,[Rn>],±Rm>,LSL # offset_12>

        LDR|STR{cond>}{B}{T} Rd>,[Rn>],±Rm>,LSR # offset_12>

        LDR|STR{cond>}{B}{T} Rd>,[Rn>],±Rm>,ASR # offset_12>

        LDR|STR{cond>}{B}{T} Rd>,[Rn>],±Rm>,ROR # offset_12>

        LDR|STR{cond>}{B}{T} Rd>,[Rn>],±Rm>,RRX

        其中:

        · Rn為基址寄存器,該寄存器包含內(nèi)存訪問(wèn)的基地址;

        · Rm>為偏移地址寄存器,包含內(nèi)存訪問(wèn)地址偏移量;

        · LSL表示邏輯左移操作;

        · LSR表示邏輯右移操作;

        · ASR表示算術(shù)右移操作;

        · ROR表示循環(huán)右移操作;

        · RRX表示擴(kuò)展的循環(huán)右移。

        · shift_imm>為移位立即數(shù)。

        (3)操作偽代碼

        Address = Rn

        Case shift of

        0b00 /*LSL*/

        Index = Rm logic_shift_left shift_imm

        0b01 /*LSR*/

        If shift_imm = = 0 then /*LSR #32*/

        Index = 0

        Else

        Index = Rm logical_shift_right shift_imm

        0b10 /*ASR*/

        If shift_imm = = 0 then /*ASR #32*/

        If Rm[31] = = 1 then

        Index = 0xffffffff

        Else

        Index = 0

        Else

        Index = Rm Arithmetic_shift_Right shift_imm

        0b11 /* ROR or RRX*/

        If shift_imm = = 0 then /*RRX*/

        Index = (C flag Logical_shift_left 31) OR

        (Rm logical_shift_Right 1)

        Else /*ROR*/

        Index = Rm Rotate_Right shift_imm

        Endcase

        If ConditionPassed{cond} then

        If U = = 1 then

        Rn = Rn + index

        Else /*U = = 0*/

        Rn = Rn – index

        (4)說(shuō)明

        ① LDRBT、LDRT、STRBT和STRT指令只支持后索引尋址。

        ② 當(dāng)PC用作基址寄存器Rn或Rm時(shí),指令執(zhí)行結(jié)果不可預(yù)知。

        ③ 當(dāng)Rn和Rm是同一個(gè)寄存器時(shí),指令的執(zhí)行結(jié)果不可預(yù)知。

        4.2.2 雜類(lèi)Load/Store指令的尋址方式

        使用該類(lèi)尋址方式的指令的如下。

        LDR|STR{cond>}H|SH|SB|D Rd>,addressing_mode>

        使用該類(lèi)尋址方式的指令包括:(有符號(hào)/無(wú)符號(hào))半字Load/Store指令、有符號(hào)字節(jié)Load/Store指令和雙字Load/Store指令。

        該類(lèi)尋址方式分為6種類(lèi)型,如表4.4所示。

        表4.4 雜類(lèi)Load/Store指令的尋址方式

        格 式

        模 式

        1

        [Rn,#±offset_8>]

        立即數(shù)偏移尋址

        (Immediate offset)

        2

        [Rn,±Rm]

        寄存器偏移尋址

        (Register offset)

        3

        [Rn,#± offset_8>]!

        立即數(shù)前索引尋址

        (Immediate pre-indexed)

        4

        [Rn,±Rm]!

        寄存器前索引尋址

        (Register post-indexed)

        5

        [Rn],#± offset_8>

        立即數(shù)后索引尋址

        (Immediate post-indeded)

        6

        [Rn],±Rm>

        寄存器后索引尋址

        (Register post-indexed)



        評(píng)論


        相關(guān)推薦

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

        關(guān)閉