<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > 協(xié)處理器及其他指令之:狀態(tài)寄存器訪(fǎng)問(wèn)指令

協(xié)處理器及其他指令之:狀態(tài)寄存器訪(fǎng)問(wèn)指令

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

本文引用地址:http://dyxdggzs.com/article/257051.htm

9.2.2寫(xiě)狀態(tài)寄存器指令MSR

1.指令編碼格式

寫(xiě)狀態(tài)寄存器指令MSR(MovetoStatusRegisterfromRegister)。在處理器中,只有MSR指令可以直接設置狀態(tài)寄存器CPSR或SPSR。

圖9.7、圖9.8分別顯示了源操作數為立即數的MSR指令和源操作數為寄存器的MSR指令的編碼格式。

圖9.7源操作數為立即數的MSR指令編碼格式

圖9.8源操作數為寄存器的MSR指令編碼格式

2.指令的語(yǔ)法格式

MSR{cond>}CPSR_fields>,#immediate>

MSR{cond>}CPSR_fields>,Rm>

MSR{cond>}SPSR_fields>,#immediate>

MSR{cond>}SPSR_fields>,Rm>

①cond>

為指令編碼中的條件域。它指示指令在什么條件下執行。當cond>忽略時(shí),指令為無(wú)條件執行(cond=AL(Alway))。

②fields>

域標志位,是下面選項中的一種或幾種的組合。

·C:設置控制位掩碼域(bit[16])。

·X:設置擴展位掩碼域(bit[17])。

·S:設置狀態(tài)位掩碼域(bit[18])。

·F:設置標志位掩碼域(bit[19])

③immediate>

將被傳送到CPSR和SPSR寄存器的立即數。此立即數可以為8位立即數(范圍在0x00~0xff之間)。

④Rm>

指定的通用寄存器,此寄存器包含將要被傳送狀態(tài)寄存器中的數據。

3.指令操作的偽代碼

指令操作的偽代碼如下面程序段所示。

IfConditionPassed{cond}then

Ifopcode[25]==1

Operand=8_bit_immediateRotate_Right{rotate_imm*2}

Else/*opcode[25]==0*/

Operand=Rm

IfR==0then

Iffield_mask[0]==1andinAprivilegedMode()then

CPSR[7:0]=operand[7:0]

Iffield_mask[1]==1andinAprivilegedMode()then

CPSR[15:8]=operand[15:8]

Iffield_mask[2]==1andinAprivilegedMode()then

CPSR[23:16]=operand[23:16]

Iffield_mask[3]==1andthen

CPSR[31:24]=operand[31:24]

Else/*R==1*/

Iffield_mask[0]==1andCurrentModeHasSPSR()then

SPSR[7:0]=operand[7:0]

Iffield_mask[1]==1andCurrentModeHasSPSR()then

SPSR[15:8]=operand[15:8]

Iffield_mask[2]==1andCurrentModeHasSPSR()then

SPSR[23:16]=operand[23:16]

Iffield_mask[3]==1andCurrentModeHasSPSR()then

SPSR[31:24]=operand[31:24]



評論


相關(guān)推薦

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

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>