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]

Re: asm changes? [Was: Re: flow.c bugfix ]


> Another option would be to allow clobbers that overlap an input.  That would
> standardize existing practice which may also be acceptable to Linus. 

If we change gcc to suddenly allocate explicitly clobbered regs to input
operands, we are going to break all correctly written asm statements
that assume that this cannot happen.  The correct behaviour has been
documented at least since gcc-1.42, and actual behaviour has been different
only on SMALL_REGISTER_CLASSES machines.  I don't think we want to change
the meaning of all existing asm statements out there.

A reasonably clean way of extending the current syntax might be to allow
specifying that an output is unused, e.g.:

__asm__ ("" : "=&a" : "0" (input_value))

That way one could avoid the nuisance of having all those dummy variables
which are currently needed.  One problem is going to be how to figure out
a machine mode for such an operand.

Bernd



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