diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-28 19:30:35 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-28 19:30:35 +0000 |
commit | 75b115f41512fbbab79191059ba6a21bbd98a7c9 (patch) | |
tree | 4c82297976aa40239ce99ee19b893f74abe8b60d /gcc | |
parent | 1d9ca4f001f34692e768942c8a1295ab96783917 (diff) | |
download | gcc-75b115f41512fbbab79191059ba6a21bbd98a7c9.tar.gz |
gcc/
* doc/md.texi: Document the restrictions on the "enabled" attribute.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/doc/md.texi | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b1d567efd0..11c3103c323 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> PR c++/47202 diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 13e34b5e2a9..3bd1c564d92 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -4094,11 +4094,11 @@ Unsigned constant valid for BccUI instructions @subsection Disable insn alternatives using the @code{enabled} attribute @cindex enabled -The @code{enabled} insn attribute may be used to disable certain insn -alternatives for machine-specific reasons. This is useful when adding -new instructions to an existing pattern which are only available for -certain cpu architecture levels as specified with the @code{-march=} -option. +The @code{enabled} insn attribute may be used to disable insn +alternatives that are not available for the current subtarget. +This is useful when adding new instructions to an existing pattern +which are only available for certain cpu architecture levels as +specified with the @code{-march=} option. If an insn alternative is disabled, then it will never be used. The 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 defined as usual using the @code{define_attr} command. This 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 @code{(const_int 1)} for an enabled alternative and to @code{(const_int 0)} otherwise. |