This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: asm changes? [Was: Re: flow.c bugfix ]
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: asm changes? [Was: Re: flow.c bugfix ]
- From: Bernd Schmidt <crux at pool dot informatik dot rwth-aachen dot de>
- Date: Fri, 4 Dec 1998 22:48:20 +0100 (MET)
- cc: Richard Henderson <rth at cygnus dot com>, egcs at cygnus dot com
> 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