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

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

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

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

      2. 新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > ARM指令尋址方式之: 數據處理指令的尋址方式

        ARM指令尋址方式之: 數據處理指令的尋址方式

        作者: 時間:2013-09-13 來源:網絡 收藏

        本文引用地址:http://www.antipu.com.cn/article/257084.htm

        6.Rm>, LSR Rs>

        (1)編碼格式

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

        圖4.7 ——寄存器邏輯右移尋址編碼格式

        此操作將寄存器Rm的數值邏輯右移一定的位數。移位的位數由Rs的最低8位bit[7∶0]決定。移出的位由0補齊。當Rs[7∶0]大于0而小于32時,進位標志C由最后移出的位決定,當Rs[7∶0]大于32時,進位標志位為0,當Rs[7∶0]等于0時,進位標志不變。

        (2)語法格式

        opcode> {cond>} {S} Rd>,Rn>,Rm>,LSR Rs>

        其中:

        · Rm>為指令被移位的寄存器;

        · LSR為邏輯右移操作標識;

        · Rs>為包含邏輯右移位數的寄存器。

        (3)操作偽代碼

        if Rs[7:0] = = 0 then

        shifter_operand = Rm

        shifter_carry_out = C flag

        else if Rs[7:0] 32 then

        shifter_operand = Rm logical_shift_Right Rs[7:0]

        shifter_carry_out = Rm[Rs[7:0] - 1]

        else if Rs[7:0] = = 32 then

        shifter_operand = 0

        shifter_carry_out = Rm[31]

        else /*Rs的后8位大于零*/

        shifter_operand = 0

        shifter_carry_out = 0

        (4)說明

        如果程序計數器r15被用作Rd、Rm、Rn或Rs中的任意一個,則指令的執(zhí)行結果不可預知。

        7.Rm>, ASR #shift_imm>

        (1)編碼格式

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

        圖4.8 ——立即數算術右移尋址編碼格式

        指令的操作數為寄存器Rm的數值邏輯右移shift_imm>位。shift_imm>的值范圍為0~31,當shift_imm>等于0時,移位位數為32,所以移位位數范圍為1~32位。進位移位操作后,空出的位添Rm的最高位Rm[31]。進位標志為Rm最后被移出的數值。

        (2)語法格式

        opcode> {cond>} {S} Rd>,Rn>,Rm>,ASR #shift_imm>

        其中:

        · Rm>為被移位的寄存器;

        · ASR為算術右移操作標識;

        · shift_imm>為算術右移位數,范圍為1~32,當shift_imm等于0時移位位數為32。

        (3)操作偽代碼

        if shift_imm == 0 then /*執(zhí)行寄存器操作*/

        if Rm[31] = = 0 then

        shifter_operand = 0

        shifter_carry_out = Rm[31]

        else /*Rm[31] = = 1*/

        shifter_operand = 0xffffffff

        shifter_carry_out = Rm[31]

        else /*shift_imm > 0*/

        shifter_operand = Rm Arithmetic_shift_Right shift_imm>

        shifter_carry_out = Rm[shift_imm - 1]

        (4)說明

        ① 如果指令中的Rm或Rn指定為程序計數器r15,則操作數的值為當前指令地址加8。



        評論


        相關推薦

        技術專區(qū)

        關閉