[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
RE: [coldfire-gnu-discuss] Inline Assembly
- To: <coldfire-gnu-discuss@xxxxxxxxxxxxxxxx>
- Subject: RE: [coldfire-gnu-discuss] Inline Assembly
- From: "Corrin Meyer" <Corrin.Meyer@xxxxxxxxxxxxxxx>
- Date: Tue, 5 Aug 2008 10:26:11 -0400
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
|