GNU replacing obsolete assembly instructions in PowerPc architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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

I wrote the following asm instructions to read the TBR:

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

When I compiled (using GNU 4) and viewed the asm instruction I saw that
*mftbu* and *mftb* were replaced with *mfspr* instruction.

After search in the documentations 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 compiler knew that it should replace the obsolete
instruction ? did PPC deliberately added a patch to make the complier make
those changes ? should i worry that the compiler can change explicitly
written asm instructions ?



*And the most important question, is there a flag I can use to explicitly
prevent those changes from happening ?*

Thanks for the help !!!,
Ilya German




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux