首页 > 其他 > 详细

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

时间:2014-06-24 14:33:59      阅读:479      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!