mtmsr[fp] do not follow sync

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

mtmsr[fp] do not follow sync

518 次查看
poloyellow
Contributor I

hi,

   I had a test in mpc8640.  I try to do mtmsr[fp] but forget the synchronizing instruction followed.

for example:

/****************************************/

mfmsr  r3

rlwinm r3,r3,0,19,17     /*mask  fp*/

ori  r3,r3,0x1000   /* set ME*/

mtmsr  r3

sync

ori  r3,r3,0x2000   /* set fp, without sync followed*/

mtmsr  r3

stfd  f0,  48(r1)

/*********************************/

When I excute the code, the cpu seems do not enter any exception or interrupt, include machine check, and there isn't any response in serial port. So I don't know what the cpu is doing after the instruction 'stfd', and which state the cpu is in.

Can anyone give me any explanation?

 Thanks.

Polo Yellow

标记 (1)
0 项奖励
1 回复

418 次查看
alexander_yakov
NXP Employee
NXP Employee

According to E600 Core Reference Manual:

"A context synchronizing instruction must follow an mtmsr instruction"

This is said explicitly in section Section 2.1.4.4 "Machine State Register (MSR)"

In this statement word "must", as per my personal understanding, means that violating this rule will lead to unpredictable results.


Have a great day,
Alexander
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励