[coldfire-gnu-discuss] Inline Assembly
Daniel Jacobowitz
dan at codesourcery.com
Tue Aug 5 14:18:55 UTC 2008
On Tue, Aug 05, 2008 at 09:58:46AM -0400, Corrin Meyer wrote:
> : "=d" (old_ipl) : "d" (_ipl) : "%%d7" );
You need =&d, not =d. From the GCC manual:
Unless an output operand has the `&' constraint modifier, GCC may
allocate it in the same register as an unrelated input operand, on the
assumption the inputs are consumed before the outputs are produced.
This assumption may be false if the assembler code actually consists of
more than one instruction. In such a case, use `&' for each output
operand that may not overlap an input. *Note Modifiers::.
--
Daniel Jacobowitz
CodeSourcery
More information about the coldfire-gnu-discuss
mailing list