extend.texi: Clarify proper uses for register clobbers in asms.

* extend.texi: Clarify proper uses for register clobbers in asms.
1

From-SVN: r23531
This commit is contained in:
Hans-Peter Nilsson 1998-11-04 23:15:35 +01:00 committed by Jeff Law
parent 174bcdb915
commit 8fe1938e51
2 changed files with 12 additions and 0 deletions

View 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.

View 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,