This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR inline-asm/16194, register and clobbers
- From: Jeffrey A Law <law at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 17 Jan 2005 11:18:15 -0700
- Subject: Re: [PATCH] Fix PR inline-asm/16194, register and clobbers
- Organization: Red Hat, Inc
- References: <AB96BC62-66C5-11D9-91AF-000A95D692F4@physics.uc.edu>
- Reply-to: law at redhat dot com
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.
> Andrew Pinski
> * stmt.c (expand_asm_operands): Skip passed INDIRECT_REF if the
> constraint allows memory right before checking against the
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.