syntax of asm

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

 



https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html

I see things like "=r", "r", "=a", "=X" and "cc". I don't quite
understand what they mean. Could anybody help me understand them?

#include <stdio.h>

int main() {
	int src = 1;
	int dst;

	asm ("mov %1, %0\n\t"
			"add $1, %0"
			: "=r" (dst)
			: "r" (src));
	printf("%d\n", dst);
	return 0;
}

-- 
Regards,
Peng



[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