[coldfire-gnu-discuss] Inline Assembly
Corrin Meyer
Corrin.Meyer at dornerworks.com
Tue Aug 5 14:26:11 UTC 2008
Daniel Jacobowitz
>> : "=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::.
Thank you very much. That seems to have solved my problem.
Corrin Meyer
More information about the coldfire-gnu-discuss
mailing list