This is the mail archive of the gcc@gcc.gnu.org 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: RFD: asm-register-declared local variables and asm clobber overlap


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


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