码迷,mamicode.com
首页 > 其他好文 > 详细

meaning of "%U0%X0" in PowerPC in the GCC inline asm

时间:2014-06-24 14:34:54      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:code   http   os   html   cti   for   

There are idiosyncrasies in the GCC inline assembly syntax.in the line,

__asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i));

the stw assembly instruction takes 2 arguments and the %U0%X0 are constraints on the arguments. These constraints are to force GCC to analyze the arguments and make sure you dont do something stupid. As it turns out, ‘U‘ is powerpc-specific. The full list of constraints can be found in :

http://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints

https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-Constraints

 

 

meaning of "%U0%X0" in PowerPC in the GCC inline asm,布布扣,bubuko.com

meaning of "%U0%X0" in PowerPC in the GCC inline asm

标签:code   http   os   html   cti   for   

原文地址:http://www.cnblogs.com/mrzcb/p/3804839.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!