This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFD: asm-register-declared local variables and asm clobber overlap
- From: Richard Zidlicky <rz at linux-m68k dot org>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 19 Sep 2002 12:04:30 +0200
- Subject: Re: RFD: asm-register-declared local variables and asm clobber overlap
- References: <200209182000.WAA21632@ignucius.axis.se>
On Wed, Sep 18, 2002 at 10:00:16PM +0200, Hans-Peter Nilsson wrote:
> Summary:
> When asm-register-declared local variables (using the feature
> "Explicit Reg Vars") are used as operands in an asm, what should
> happen if the asm clobber list mention those registers?
>
> I think that GCC should detect the overlap and emit an error.
> Alternatively, the register allocator should allocate a
> temporary register to avoid the clobber list (with the usual
> error if it can't find any register to satisfy constraints).
> I'd prefer the first to happen (least unintuitive, least
> surprising), but currently neither happens.
just a me too. The situation is unfortunate because the questionable
clobber-list notation was afaics the only way to make i/o register
variables work at all in gcc-2.7* whereas it produces wrong code
with gcc>=3.0 - without a bit of warning.
Richard