AT&T &r作用
2012-04-21 16:24
155 查看
:"=&r"(val)
:"r"(1),"r"(lock):
"&" : Means that this operand is an earlyclobber operand, which is modified before the instruction is finished using the input operands. Therefore, this operand may not lie in a register that is used as an input operand or as part of any memory address.
可以理解为:'&'表示该输出操作('&'只用于修饰输出)完成于其他输入操作完成之前。因此需要确保对应寄存器中的值不能被其他的输入操作篡改。(怎样确保呢?输入输出使用不同的寄存器就行了。实际上'&'约束就是这个意思。)
http://hi.baidu.com/_kouu/blog/item/d4430a81516d16de9123d9f9.html
:"r"(1),"r"(lock):
"&" : Means that this operand is an earlyclobber operand, which is modified before the instruction is finished using the input operands. Therefore, this operand may not lie in a register that is used as an input operand or as part of any memory address.
可以理解为:'&'表示该输出操作('&'只用于修饰输出)完成于其他输入操作完成之前。因此需要确保对应寄存器中的值不能被其他的输入操作篡改。(怎样确保呢?输入输出使用不同的寄存器就行了。实际上'&'约束就是这个意思。)
http://hi.baidu.com/_kouu/blog/item/d4430a81516d16de9123d9f9.html
相关文章推荐
- Debug error:"One or more breakpoints cannot be set and have been disabled.Execution will stop at the beginning of the program."
- <转载>基础篇、AlarmManager类的作用
- URI中 ? # & 的作用
- Linux shell中运行命令后加上字符“&”的作用
- Please ensure that adb is correctly located at '/home/lq/android/sdk/platform-tools/adb'...
- AT&T ASM 学习4
- ecshop中define('IN_ECS', true)的作用
- [Err] 1136 - Column count doesn't match value count at row 1
- AT&T ASSEMBLY FOR LINUX AND MAC (SYS_FORK)
- 解决Incorrect integer value: '' for column 'id' at row 1的方法
- ASP.NET中App_Code,App_Data等文件夹的作用<转>
- linux汇编工具之GAS(AT&T 语法)和NASM(Intel 语法)比较
- :>/dev/null 2>&1 的作用
- SpringMVC入门及系列教程(五)-响应处理&响应参数处理&SpringMVC作用域对象&SpringMVC原生Servlet对象
- PHP @ at 记号的作用
- PHP @ at 记号的作用
- mysql连接url中useUnicode=true&characterEncoding=UTF-8的作用
- request.getHeader("referer")的作用
- MyEclipse中出现Multiple annotations found at this line: - Syntax error, insert "}" to complete 错误解决方法