summaryrefslogtreecommitdiff
path: root/gcc/doc/md.texi
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-10 20:24:45 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-10 20:24:45 +0000
commit15f255bdf8785cef57a8dc99a4b51db8c8f27cce (patch)
tree9ddd3e71e5eb92c8ed67ae5ff399982b7ba29d71 /gcc/doc/md.texi
parentd37b1ac9e99e9bd33b0d2be2fe22eef2374465d1 (diff)
downloadgcc-15f255bdf8785cef57a8dc99a4b51db8c8f27cce.tar.gz
gcc/
* doc/md.texi: Document the "unspec" and "unspecv" enum names. * Makefile.in (OBJS-common): Include insn-enums.o. (insn-enums.o): New rule. (simple_generated_c): Add insn-enums.c. (build/genenums.o): New rule. (genprogmd): Add "enums". * genconstants.c (print_enum_type): Declare a C string array for each enum. * genenums.c: New file. * print-rtl.c (print_rtx): If defined, use the "unspecv" enum for UNSPEC_VOLATILE. If defined, use the "unspec" enum for both UNSPEC and (as a fallback) for UNSPEC_VOLATILE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160582 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/md.texi')
-rw-r--r--gcc/doc/md.texi31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index d0aa8646ede..c37bb039494 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -7997,6 +7997,37 @@ synchronization instructions in a separate @file{sync.md} file,
it is convenient to define all synchronization-specific enumeration
values in @file{sync.md} rather than in the main @file{.md} file.
+Some enumeration names have special significance to GCC:
+
+@table @code
+@item unspecv
+@findex unspec_volatile
+If an enumeration called @code{unspecv} is defined, GCC will use it
+when printing out @code{unspec_volatile} expressions. For example:
+
+@smallexample
+(define_c_enum "unspecv" [
+ UNSPECV_BLOCKAGE
+])
+@end smallexample
+
+causes GCC to print @samp{(unspec_volatile @dots{} 0)} as:
+
+@smallexample
+(unspec_volatile ... UNSPECV_BLOCKAGE)
+@end smallexample
+
+@item unspec
+@findex unspec
+If an enumeration called @code{unspec} is defined, GCC will use
+it when printing out @code{unspec} expressions. GCC will also use
+it when printing out @code{unspec_volatile} expressions unless an
+@code{unspecv} enumeration is also defined. You can therefore
+decide whether to keep separate enumerations for volatile and
+non-volatile expressions or whether to use the same enumeration
+for both.
+@end table
+
@findex define_enum
@anchor{define_enum}
Another way of defining an enumeration is to use @code{define_enum}: