diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae03458f0bb..a2c5bee1c9c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue Sep 8 23:46:04 1998 Hans-Peter Nilsson + + * extend.texi: Clarify proper uses for register clobbers in asms. + Wed Nov 4 22:16:36 1998 Bernd Schmidt * recog.h (enum op_type): Define. diff --git a/gcc/extend.texi b/gcc/extend.texi index a2c278b001c..dac40359303 100644 --- a/gcc/extend.texi +++ b/gcc/extend.texi @@ -2404,6 +2404,14 @@ asm volatile ("movc3 %0,%1,%2" : "r0", "r1", "r2", "r3", "r4", "r5"); @end example +It is an error for a clobber description to overlap an input or output +operand (for example, an operand describing a register class with one +member, mentioned in the clobber list). Most notably, it is invalid to +describe that an input operand is modified, but unused as output. It has +to be specified as an input and output operand anyway. Note that if there +are only unused output operands, you will then also need to specify +@code{volatile} for the @code{asm} construct, as described below. + If you refer to a particular hardware register from the assembler code, you will probably have to list the register after the third colon to tell the compiler the register's value is modified. In some assemblers,