public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* need volatile for asm?
@ 2011-02-15 23:58 kevin diggs
  2011-02-16  5:25 ` Andi Hellmund
  0 siblings, 1 reply; 6+ messages in thread
From: kevin diggs @ 2011-02-15 23:58 UTC (permalink / raw)
  To: gcc-help

Hi,

Does the asm in:

#include <stdio.h>

int main(int argc, char *argv[])
{
unsigned int pc;

	asm("\n\t"
		"call 1f\n\t"
		"1: pop %0\n"
		:"=g"(pc)
	);

	printf(__FILE__"`%s()-%d:  %%pc is %p\n",__func__,__LINE__,pc);

	return 0;
}

need volatile?

Thanks!

kevin

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

end of thread, other threads:[~2011-02-16 11:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-15 23:58 need volatile for asm? kevin diggs
2011-02-16  5:25 ` Andi Hellmund
2011-02-16 10:33   ` Andrew Haley
2011-02-16 10:59   ` Drasko DRASKOVIC
2011-02-16 11:18     ` Andi Hellmund
2011-02-16 12:12       ` David Brown

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).