public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* asm constraints
@ 2004-08-27  6:58 Zvilius, Mark
  2004-08-27 11:16 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Zvilius, Mark @ 2004-08-27  6:58 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-27  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-27  6:58 asm constraints Zvilius, Mark
2004-08-27 11:16 ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).