Reding TBR registers P2020 CPU

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Reding TBR registers P2020 CPU

1,148件の閲覧回数
ilya_german
Contributor I

Hi,

I have a quastion regarding reading TBR registers on p2020 e500v2 CPU.

I wrote the following asm instructions:

 mftbu   r5      /* Read upper Time Base */
 mftb    r6      /* Read lower Time Base */
 mftbu   r7      /* Read upper Time Base again */

When i comliped (using GNU 4.3.3) and viewed the asm instruction I saw that mftbu and mftb were replaced with mfspr instruction.

after search in documentation i found in: EREF 2.0: A Programmer’s Reference Manual for Freescale Power Arch Processors (P.504). The following note : mftb was part of the original PowerPc arch, but is being phased out of PowerISA....

How did the GNU compilar knew that it should replace the obsolete instruction ? did NXP added a patch to the GNU release ? should i worry that the compilar can change explicitly written asm instructions ?

Thanks,

Ilya German

0 件の賞賛
返信
1 返信

1,072件の閲覧回数
ufedor
NXP Employee
NXP Employee

It is reasonable to pose the questions in a gcc.gnu.org mailing list.

0 件の賞賛
返信