md.texi: Document the restrictions on the "enabled" attribute.

gcc/
	* doc/md.texi: Document the restrictions on the "enabled" attribute.

From-SVN: r211030
This commit is contained in:
Richard Sandiford 2014-05-28 19:30:35 +00:00 committed by Richard Sandiford
parent d67ff7b75d
commit 5a7555ab10
2 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2014-05-28 Richard Sandiford <rdsandiford@googlemail.com>
* doc/md.texi: Document the restrictions on the "enabled" attribute.
2014-05-28 Jason Merrill <jason@redhat.com> 2014-05-28 Jason Merrill <jason@redhat.com>
PR c++/47202 PR c++/47202

View File

@ -4094,11 +4094,11 @@ Unsigned constant valid for BccUI instructions
@subsection Disable insn alternatives using the @code{enabled} attribute @subsection Disable insn alternatives using the @code{enabled} attribute
@cindex enabled @cindex enabled
The @code{enabled} insn attribute may be used to disable certain insn The @code{enabled} insn attribute may be used to disable insn
alternatives for machine-specific reasons. This is useful when adding alternatives that are not available for the current subtarget.
new instructions to an existing pattern which are only available for This is useful when adding new instructions to an existing pattern
certain cpu architecture levels as specified with the @code{-march=} which are only available for certain cpu architecture levels as
option. specified with the @code{-march=} option.
If an insn alternative is disabled, then it will never be used. The If an insn alternative is disabled, then it will never be used. The
compiler treats the constraints for the disabled alternative as compiler treats the constraints for the disabled alternative as
@ -4112,6 +4112,10 @@ in the machine description files:
A definition of the @code{enabled} insn attribute. The attribute is A definition of the @code{enabled} insn attribute. The attribute is
defined as usual using the @code{define_attr} command. This defined as usual using the @code{define_attr} command. This
definition should be based on other insn attributes and/or target flags. definition should be based on other insn attributes and/or target flags.
The attribute must be a static property of the subtarget; that is, it
must not depend on the current operands or any other dynamic context
(for example, the location of the insn within the body of a loop).
The @code{enabled} attribute is a numeric attribute and should evaluate to The @code{enabled} attribute is a numeric attribute and should evaluate to
@code{(const_int 1)} for an enabled alternative and to @code{(const_int 1)} for an enabled alternative and to
@code{(const_int 0)} otherwise. @code{(const_int 0)} otherwise.