Commit 0c6390fa by H.J. Lu Committed by H.J. Lu

re PR target/38941 (CX isn't preserved with shift)

2009-01-27  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/38941
	* doc/extend.texi: Improve local variable with asm reg.

From-SVN: r143719
parent bee6fa6d
2009-01-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/38941
* doc/extend.texi: Improve local variable with asm reg.
2009-01-27 Adam Nemet <anemet@caviumnetworks.com> 2009-01-27 Adam Nemet <anemet@caviumnetworks.com>
* c.opt (Wpacked-bitfield-compat): Change init value to -1. * c.opt (Wpacked-bitfield-compat): Change init value to -1.
......
...@@ -4852,6 +4852,8 @@ asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2)); ...@@ -4852,6 +4852,8 @@ asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2));
In the above example, beware that a register that is call-clobbered by In the above example, beware that a register that is call-clobbered by
the target ABI will be overwritten by any function call in the the target ABI will be overwritten by any function call in the
assignment, including library calls for arithmetic operators. assignment, including library calls for arithmetic operators.
Also a register may be clobbered when generating some operations,
like variable shift, memory copy or memory move on x86.
Assuming it is a call-clobbered register, this may happen to @code{r0} Assuming it is a call-clobbered register, this may happen to @code{r0}
above by the assignment to @code{p2}. If you have to use such a above by the assignment to @code{p2}. If you have to use such a
register, use temporary variables for expressions between the register register, use temporary variables for expressions between the register
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment