This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: decl_conflicts_with_clobbers_p problem
On Thu, Mar 13, 2003 at 11:06:11AM +0100, Andreas Schwab wrote:
> Gunther Nikl <gni at gecko dot de> writes:
>
> |> The clobber list contains all registers that can be changed by a system
> |> function as defined by the system ABI. In this example the system function
> |> expects its argument in register "a1". Thus the value for _n1 is bound to
> |> register "a1" and passed as an input to the asm() statement. With GCC 3.3
> |> the asm statement is rejected because of overlapping inputs and clobbers :-(
> |> For me the asm statememt looks fine because I must pass the argument in
> |> register "a1" and its correct that the contents of register "a1" cannot be
> |> relied on after the call anymore.
> |> Is the example asm statement wrong or is decl_conflicts_with_clobbers_p()
> |> wrong?
>
> Just list _n1 as an output operand.
Sorry, but I don't understand that suggestion. Why is that supposed to help?
Then, it doesn't look like a generic solution because the register which is
used to pass the argument is an argument to the macro itself and it can be
any register not just the ones in the clobber list. Eg. if its "d[2-7]" or
"a[2-6]" then the value passed is preserved by the system function.
Gunther