MPC5675K equivalent of "mftb" instruction

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

MPC5675K equivalent of "mftb" instruction

跳至解决方案
2,033 次查看
matthewclark
Contributor III

I'm trying to port some benchmark code from a 440 core processor to the MPC5675K.  On the 440, I can access the time base register with the "mftb" and "mftbu" inline assembly commands, but Code Warrior will cry on the 5675K:

 

Instruction "MFTB" can not be translated from Classic PPC to VLE PPC.

 

Can anyone point me the right direction?  I tried looking at the VLEPIM, but didn't see anything that looked helpful.

 

Thanks,

 

Matt

标签 (1)
0 项奖励
回复
1 解答
1,515 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Use syntax

mfspr rD,268 (instead of tbl)

mfspr rD,269 (instead of tbu)

There are different SPR numbers for read and write:

For read - 268/269

For write - 284/285

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,516 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Use syntax

mfspr rD,268 (instead of tbl)

mfspr rD,269 (instead of tbu)

There are different SPR numbers for read and write:

For read - 268/269

For write - 284/285

0 项奖励
回复