extend.texi: Clarify proper uses for register clobbers in asms.
authorHans-Peter Nilsson <hp@axis.se>
Wed, 4 Nov 1998 22:15:35 +0000 (23:15 +0100)
committerJeff Law <law@gcc.gnu.org>
Wed, 4 Nov 1998 22:15:35 +0000 (15:15 -0700)
        * extend.texi: Clarify proper uses for register clobbers in asms.
1

From-SVN: r23531

gcc/ChangeLog
gcc/extend.texi

index ae03458f0bbc6911092216926711450b39b0a429..a2c5bee1c9c267af3f36fe70e531e033c169f11d 100644 (file)
@@ -1,3 +1,7 @@
+Tue Sep  8 23:46:04 1998  Hans-Peter Nilsson  <hp@axis.se>
+
+       * extend.texi: Clarify proper uses for register clobbers in asms.
+
 Wed Nov  4 22:16:36 1998  Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
 
        * recog.h (enum op_type): Define.
index a2c278b001c990f9868a4dad64d1c32bc60d591c..dac403593034cdef49ca5baff0c2ae197840cf66 100644 (file)
@@ -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,