2009年6月24日 星期三

Inline Assembly

Professional Linux Programming, p44
The Linux Kernel and the GNU Toolchain
Inline Assembly

__asm__ ( Machine specific assembly instructions
: Machine specific registers affected by the instruction
: Machine specific registers required as inputs)

__asm__ __volatile ("stw %0,0(%1); eieio"
: //no output registers here
: "r"(data), "r"(address));

沒有留言: