asm constraints

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

 



For a PowerPC architecture I'm using the following asm statement in C source
to read a time base register:

	unsigned int tbl;
	__asm__("mftbl %0" : "=r" (tbl));

The code this generates is:
	mftb   r0
	mr     r9,r0
	stw    r9,0x18(r31)

I'm wondering why it's wasting a register. Am I specifying the constraint
incorrectly?

Mark Z.

[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