This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR inline-asm/16194, register and clobbers

On Sat, 2005-01-15 at 02:18 -0500, Andrew Pinski wrote:
> The problem here is that if the inline-asm constraint allows memory
> and we have an INDIRECT_REF, we don't check if the register of that
> variable is the clobber list.  We ICE because later on, we see that
> the register is in the clobber and in an output register of the
> inline-asm.  The way to fix is to skip passed the INDIRECT_REF
> when checking if the variable is a global register and is in the
> clobber list.
> OK? Bootstrapped and tested on powerpc-darwin with no regressions.
> Thanks,
> Andrew Pinski
> ChangeLog:
> 	* stmt.c (expand_asm_operands): Skip passed INDIRECT_REF if the
> 	constraint allows memory right before checking against the
> 	conflicts.
You need similar code in the loop over the input operands -- it has the
same problem, which can be seen by trivially changing your testcase so 
that the *dest operand is an input rather than an output.

Consider the patch pre-approved with that change and an appropriate
addition to the testcase.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]